|
Boost Users : |
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-04-24 11:54:39
Brad Barber wrote:
> If my code contains the following regexp,
>
> const boost::tregex non_printables(__T("[^\0x21-\0x7E]+"));
>
>
>
Don't forget that your pattern is scanned first by the C++ compiler. In
this case, this means that \0x21 is never seen by the RegExp engine;
instead, it sees a NUL character (ASCII 0) followed by "x21". NUL is not
valid in any pattern and thus an exception is thrown. Use double
backslashes to get a backslash through to the engine.
Sebastian Redl
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