Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2006-02-08 05:28:56


> I get a warning which says "Unknown escape sequence '\.' . Its the
> same case with any other special character or even '\s' .
>
> I guess I'm missing something very simple.

Yep: escapes are parsed first by the compiler *before* the regex engine gets
to see the string, the compiler is complaining because \. is not a valid
escape sequence for strings in C++. You want to use "\\." so that a literal
'\' gets passed through to the regex engine to see: it then handles the '\.'
sequence as a regex.

John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net