tags:

views:

36

answers:

1

Hello. Is there equivalent to \Q ... \E in C# Regex? I can't find it.

Thank you for your help.

+3  A: 

There is no direct equivalent to the \Q...\E syntax in .NET as told on this site.

Instead you could use the Regex.Escape method :

Escapes a minimal set of characters (\, *, +, ?, |, {, [, (,), ^, $,., #, and white space) by replacing them with their escape codes.

madgnome