Multiline Regular Expressions

 

You would think that the Regular Expression option:

RegexOptions.Multiline

Matches input over multipline lines but if you have tried it you will know that it does not!

Use RegexOptions.Singleline instead of RegexOptions.Multiline allowing (.) to match newlines. Multi-line mode only affects anchors, and single-line mode only affects the dot.

See http://stackoverflow.com/questions/289440/cannot-get-regular-expression-work-correctly-with-multiline for more.

Share