Possible Duplicate:
Is gcc4.7 buggy about regular expressions?
I followed the example on http://www.cplusplus.com/reference/std/regex/regex_match/ and compiled on Ubuntu 12.04 64-bit with g++ version 4.6.3
The following is my output:
string literal matched
string object matched
range matched
string literal with 3 matches
string object with 3 matches
range with 3 matches
the matches were: [subject] [sub] [bject]
While the sample output is:
string literal matched
string object matched
range matched
string literal with 3 matches
string object with 3 matches
range with 3 matches
the matches were: [subject] [sub] [ject]
Notice that on my machine [bject] is extracted which is not right. Any ideas?