I have an old perl regex defined like this
my @data = split(/^[0-9]{1,3}\)?\t/m, $CLIP->GetText());
C# doesn’t like the regex and says Unrecognized escape sequence? How can i fix this?
I tried this in C#
Regex rex = new Regex("/^[0-9]{1,3}\)?\t/m");
The problem is
\). The easiest way to fix the problem is by changing the string to a verbatim string like this:Also, you don’t need the slashes and the trailing m in this case.