mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 22:02:08 +02:00
Fix to stop \A from matching successive matches.
[SVN r28384]
This commit is contained in:
@ -63,6 +63,8 @@ public:
|
|||||||
match_flag_type f(flags);
|
match_flag_type f(flags);
|
||||||
if(!what.length())
|
if(!what.length())
|
||||||
f |= regex_constants::match_not_initial_null;
|
f |= regex_constants::match_not_initial_null;
|
||||||
|
if(base != next_start)
|
||||||
|
f |= regex_constants::match_not_bob;
|
||||||
bool result = regex_search(next_start, end, what, re, f);
|
bool result = regex_search(next_start, end, what, re, f);
|
||||||
if(result)
|
if(result)
|
||||||
what.set_base(base);
|
what.set_base(base);
|
||||||
|
@ -134,7 +134,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(what.prefix().first != what[0].second)
|
if(what.prefix().first != what[0].second)
|
||||||
flags |= match_prev_avail;
|
flags |= match_prev_avail | regex_constants::match_not_bob;
|
||||||
BidirectionalIterator last_end(what[0].second);
|
BidirectionalIterator last_end(what[0].second);
|
||||||
if(regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags)))
|
if(regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags)))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user