[regex] invalid syntax for non-gready repeats
Hi, this inocent code throws an exception: static const regex rpath( "Return-Path:(.*?)Received: ", regex_constants::icase ); according to http://www.boost.org/libs/regex/doc/syntax.html this is how non-gready repeats are specified. Can anybody figure out what is wrong? Thanks Thorsten
| Hi, | | this inocent code throws an exception: | | static const regex rpath( "Return-Path:(.*?)Received: ", | regex_constants::icase ); hm...I could fix the problem by using regex_constants::icase | regex_constants::normal . Is it actually the intended behavior that non-gready repeats are disabled just by switching case-sensitive on-off? br Thorsten
this inocent code throws an exception:
static const regex rpath( "Return-Path:(.*?)Received: ",
regex_constants::icase );
according to http://www.boost.org/libs/regex/doc/syntax.html this is how
non-gready repeats are specified.
Can anybody figure out what is wrong?
Yes, you need to tell the lib that it's a perl expression: static const regex rpath( "Return-Path:(.*?)Received: ", regex_constants::perl|regex_constants::icase ); John.
participants (2)
-
John Maddock
-
Thorsten Ottosen