Re: [Boost-users] [Regex] : Unknown character sequence.
8 Feb
2006
8 Feb
'06
9:11 a.m.
Hi,
I'm new to regex. This is basically what I was trying.
#include <iostream> #include
int main() { std::string input = "sand._12"; boost::regex reg(".*\._[0-9]+");
Hi In C++, you need to double your escape characters, so that in order to pass '.*\._[0-9]+' to the RE, you need to pass '.*\\._[0-9]+' to the compiler. With the string that you use, the compiler will strip the sole backslash, and the RE will get '.*._[0-9]+', which isn't what you want. A+ Paul Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34 /mn) ; tél : 08 92 68 13 50 (0,34/mn)
6853
Age (days ago)
6853
Last active (days ago)
0 comments
1 participants
participants (1)
-
paul.floyd