Is there a shorter way of writing this with or without regex?
Dim q1 = System.Text.RegularExpressions.Regex.Match(myString,
"[\n\r]finished", System.Text.RegularExpressions.RegexOptions.IgnoreCase)
If (q1.Success) Then Exit Sub
Home / DeveloperSection / Forums / Match specific lines in VB.net
Is there a shorter way of writing this with or without regex?
Dim q1 = System.Text.RegularExpressions.Regex.Match(myString,
"[\n\r]finished", System.Text.RegularExpressions.RegexOptions.IgnoreCase)
If (q1.Success) Then Exit Sub
Anonymous User
05-Oct-2013Yes:
(it should be enough to check for \n unless you're also targeting old Macs (pre-OS X) files that only use \r for newlines)