John, I had in the code. It's just when I wrote this in the email, I forgot to double escape them.
Sorry about that, anyhow it still doesn't work with double escapes.
/Winson
Winson Yung wrote:
>> Hello all, I have the following regular expression, but it doesn't
>> match to this text "REVENUE
>> ................................................... $10,481.1 "
>>
>> const char* pattern[] = "Revenue[\s\.]*\$?\s*([0-9,\.]*)";
Don't you need to double up those escapes? Remember that C++ consumes the
first \ so you need \\ to pass an escape to the regex engine:
const char* pattern[] = "Revenue[\\s\\.]*\\$?\\s*([0-9,\\.]*)";
HTH, John.
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users