Hi,
Below is the sample piece of code(The code is in VB.NET), where I am expecting an answer of "true"with my basic knowledge of Regular Expressions.
---------------------------------------------------
'VB
Dim r As New Regex("^def$", RegexOptions.Multiline)
Dim d As String =String.Format("{0}{1}{2}{3}{4}{5}", "abc", System.Environment.NewLine, "def", System.Environment.NewLine, "def", System.Environment.NewLine)
MsgBox(r.Match(d).Success)
-----------------------------------------------------------
The answer I get is false, but there are two "def" in 2nd and 3rd line of the data and Multiline option is enabled, I have checked it with VS 2005 and VS 2008, both give me answer as false. What is the mistake I have done? Please help.
Thanks and Best Regards,
Bennz
Benz