I am trying to build regex pattern but the string doesn't take single double quotes.
this is the pattern and it crashes when I add \"
@"(?<\"|\'|\“)(?'first'{0}\s(?'middle'{0}{1}{2}"
I am trying to build regex pattern but the string doesn't take single double quotes.
this is the pattern and it crashes when I add \"
@"(?<\"|\'|\“)(?'first'{0}\s(?'middle'{0}{1}{2}"
In an @
string literal, you need to use ""
to escape double quotes:
@"(?<\""|\'|\“)(?'first'{0}\s(?'middle'{0}{1}{2}"