28 Mar
2011
28 Mar
'11
8:46 p.m.
Kulti
Ramon F Herrera
wrote: My pattern matching was failing when I had these definitions, which I happen to prefer:
const string number = "[0-9]+"; const string name = "[A-z][A-z0-9]*";
The program is working fine now, after I am using these ones:
const string number = "\\d+"; const string name = "[A-z]\\w*";
Could you please read documentation before posting question?
http://www.boost.org/doc/libs/1_45_0/libs/regex/doc/html/boost_regex/syntax/... racter_classes/std_char_clases.html
"w - Any word character (alphanumeric characters plus the underscore)"
Actually I don't think he was asking why w included underscores - I think he was asking why that worked and his original character class based regex didn't. Jerry