I'm trying to come up with a regular expression that will stop at the first occurence of </ol>
. My current RegEx sort of works, but only if </ol>
has spaces on either end. For instance, instead of stopping at the first instance in the line below, it'd stop at the second
some random text <a href = "asdf">and HTML</a></ol></b> bla </ol>
Here's the pattern I'm currently using: string pattern = @"some random text(.|\r|\n)*</ol>";
What am I doing wrong?