Solved Handle a file to implement th fact to jump line after a mark

May 21, 2013 at 07:55:51
Specs: Windows 7
I handle a file and I'd to implement or test in a vbscript the fact to jump a line after an equal sign? all that I write so far doesn't work.
For example, in the below-written file I want to test that all that follows '=' is written in others lines. For this example, you can assume that all lines is read at the same time with
line=fso.opentextfile("myFile.txt",1).readall

myFile.txt
t=
12 13
NJ

Thank you in advance for help


See More: Handle a file to implement th fact to jump line after a mark

Report •


#1
May 21, 2013 at 09:56:29
✔ Best Answer
I have found a solution using regular expression like this

if reg("t="&vbcrlf,line) Then
msgbox "OK"
end If

Function Reg(patrn, strng)
Set regEx = New RegExp
regEx.Pattern = patrn
r = regEx.Test(strng)
Reg= r
End Function

Thank you all the same


Report •
Related Solutions


Ask Question