regex 'literal' meaning in regex
is t开发者_C百科here 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
精彩评论