is there a way to treat a section of your regex string 'as is'?
I.e. I want to match for the literal pattern: "[^*..@/w$[{" in some text (exaggerated example, but you see what I mean)... Can I just enclose the whole bit in something?
is there a way to treat a section of your regex string 'as is'?
I.e. I want to match for the literal pattern: "[^*..@/w$[{" in some text (exaggerated example, but you see what I mean)... Can I just enclose the whole bit in something?
Use Regex.Escape
.
See http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.escape.aspx