Connecting Tech Pros Worldwide Forums | Help | Site Map

Problem with regex multiline end of line checking

aarbit@gmail.com
Guest
 
Posts: n/a
#1: Apr 20 '07
I've got these 3 lines in a string:

abc
def
ghi


Then, I take that string and run it with this:
If Regex.IsMatch(myString, "^def$", RegexOptions.Multiline) Then
outString = "Matches"
Else
outString = "No Match"
End If

I get "No Match". But if I remove the '$' it matches. Shouldn't it
match the '$' to the end of the line in multiline mode? Why isn't
this working?

Closed Thread


Similar Visual Basic .NET bytes