Similar to my question from yesterday: C# Regex Pattern Conundrum
Same issue, different regex pattern. The regex pattern returns the desired match when tested in http://sourceforge.net/projects/regextester/ and http://www.RegexLib.com But, when the pattern is executed in .NET there are no matches returned.
string SampleText = @"\r\n99. Sample text paragraph one.\r\n100. Sample text here paragraph two.\r\n101. Sample text paragraph three.\r\n";
string RegexPattern = @"(?<=\\r\\n\d+\.\s)([^.]+?)here.*?(?=\\r\\n)";
Regex FindRegex = new Regex(@RegexPattern, RegexOptions.Multiline | RegexOptions.Singleline);
Match m = FindRegex.Match(SampleText);
The desired match is "Sample text here paragraph two."
As with yesterday, I'm not sure, if the issue is my regex pattern or my code.