
5 May
2010
5 May
'10
4:03 p.m.
Actual not. The first level of backslashes is processed by C++. The regex library never sees them. This pattern with match x/filename-txt, since . is a wild card.
Oh so it's just a case that it matches string "./File.txt".
So basically I have to double backslash everytime?
Everytime you want the regex engine to see a "\" you have to put "\\" in your string since the first \ gets swallowed by the C++ parser and doesn't appear in the actual string placed in your program (of course if the regular expressions were read in from an extern text file or something then this wouldn't be the case). HTH, John.