Fix regex_iterator and regex_replace to do what grep/sed do for multiple repeats when matching in POSIX mode.

Fixes #589.

[SVN r79339]
This commit is contained in:
John Maddock
2012-07-07 18:08:01 +00:00
parent e91bd45820
commit 3bfba1a7cf
3 changed files with 11 additions and 1 deletions

View File

@ -68,7 +68,7 @@ public:
// flags |= match_prev_avail;
BidirectionalIterator next_start = what[0].second;
match_flag_type f(flags);
if(!what.length())
if(!what.length() || (f & regex_constants::match_posix))
f |= regex_constants::match_not_initial_null;
//if(base != next_start)
// f |= regex_constants::match_not_bob;