
5 May
2010
5 May
'10
2:31 p.m.
On 5 May 2010 16:23, Steven Watanabe
AMDG
Salvatore Benedetto wrote:
On 5 May 2010 16:10, Nat Goodspeed
wrote: This might (or might not) work better: "\\.\\/\\w+(\\.txt)"
Indeed I was missing a backslash.
The following worked as I expected.
std::string expression("\.\/\\w+(\.txt)");
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? Thanks again, S.