In addition, I know that I should not understand HTML like this with a regex, but this is the easiest for what I need.
I have this regex:
Regex BodyEndTagRegex = new Regex("</body>(.*)$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline);
Note that I am looking for the end of a line using $
.
Are .NET regular expressions optimized so that the entire string is not scanned? If not, how can I optimize it to start at the end?
source share