21 Apr
2005
21 Apr
'05
12:04 p.m.
I am using the boost::regexp_iterator to list every match of a user configured regexp in the contents of a file. The file is read up into a single string and passed into the constructor of regexp_iterator. Take the example regexp of "a|\Ab" which means that every 'a' letter will be a match, plus the 'b' letter should be a match if it is the first one of the file. But the algorithm does not work like this! The letter 'b' is matched every time it follows an 'a'. Because '\A' does not mean the beginning of the original client-code-supplied buffer! After the first match, the '\A' only means the end of the last match.
Confirmed as a bug, it'll be fixed in cvs very shortly, Thanks for the report, John.