I totally get how to escape back slashes, which is why this is throwing me for a loop:
I have tried everything -- not using @
and manually escaping the back slashes, use the @
and escaping... nothing seems to work. What am I missing? What am I doing wrong?
I am using .NET Core 2.0.
Here is the code:
var path = "this is a test/{lcc_root_whatever}/string done.";
if (Regex.IsMatch(path, @"\Q/{lcc_root_\E[[:word:]]+\Q}/\E"))
{
}