Re: remove first horizontal tab on each line by mayayana
mayayana
Sat Mar 18 10:40:23 CST 2006
By horizontal tab you mean a tab character that
insets the text? You should be able to just
use Replace:
If s is the file as a string then -
s1 = vbCrLf & Chr(9)
s = Replace(s, s1, vbCrLf)
That will replace all strings consisitng of a line return
and tab character with just a line return, effectively
removing all tabs that start lines. The only exception
will be the first line. You'd need to do that separately:
If Left(s, 1) = Chr(9) then s = Right(s, (len(s) - 1))
> Hi,
>
> I am using VBScript RegEx on a file to filter it and I wondered if it
> was possible to remove only the first horizontal tab on each line?
>
> Aidy
>