How do I match and replace text using Regular expression in multiline mode? I know the RegexOptions.Multiline option, but what is the best way to specify match all with the new line characters in C#.
Input:
<tag name="abc">this
is
a
text</tag>
Output:
[tag name="abc"]this
is
a
test
[/tag]
Edit: Aahh found the actual problem '&' and ';' in Regex are matching text in single line, while the same need to be escaped in the Regex to work in cases where there are new lines also.