Essentially what i am doing is finding a piece of text in a textfile. The text is user specified so before i stick it into my regex expression i need to escape it all so . are \. and that something like {0, 3} is the string literal instead of part of the regex expression. Is there a function i can use to escape it? if not what chatacters should i stick \ in front of to ensure a valid regex statement?
Essentially what i am doing is finding a piece of text in a textfile.
Share
Use
Regex.Escapemethod –http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.escape.aspx