mirror of
https://github.com/boostorg/regex.git
synced 2025-07-18 14:52:08 +02:00
Fix for .{n,} failing in partial matches.
Fix for [\x0-\xff] failing in wide character expressions. [SVN r26566]
This commit is contained in:
@ -402,7 +402,10 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
unsigned count = (std::min)(static_cast<unsigned>(re_detail::distance(position, last)), (rep->greedy ? rep->max : rep->min));
|
||||
if(rep->min > count)
|
||||
{
|
||||
position = last;
|
||||
return false; // not enough text left to match
|
||||
}
|
||||
std::advance(position, count);
|
||||
if((rep->leading) && (count < rep->max) && (rep->greedy))
|
||||
restart = position;
|
||||
|
Reference in New Issue
Block a user