Hello,
i've tried to extract certain data using Regex in a File. but it seems not working.No errors and warnings have been found.
here is my code:
the input of the function is a string that i read from a file using objreader.
any help is appreciated...t hanks!
i've tried to extract certain data using Regex in a File. but it seems not working.No errors and warnings have been found.
here is my code:
Code:
Private Sub extractTxt(ByVal inputFile As String)
' this will extract specific text from a
' file using Regular Expressions class in .net
Dim DateRegEx As Regex
Dim m As Match
Dim i As Integer
DateRegEx = New Regex("(?<month>[^/])/(?<day>[^/])/(?<year>)", RegexOptions.Multiline)
For Each m In DateRegEx.Matches(inputFile)
ListBox1.Items.Add(m.Groups("month").Value + "/" + m.Groups("day").Value + "/" + m.Groups("year").Value)
Next
End Sub
=====
any help is appreciated...t hanks!
Comment