
22 Jul
2006
22 Jul
'06
6:58 a.m.
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,\.]*)"; my code looks something like this: std::vector <unsigned int> v; boost::RegEx expr(pattern, true); v.clear(); unsigned int result = expr.Grep(v, pBuf); if (result != 0) { std::string s = expr[0]; s = expr[1]; ............ Why expr[0] and expr[1] weren't return the aboved mention text as the first match? I think set 'true' in expr constructor means do case insensitve match. /Winson.