mirror of
https://github.com/boostorg/regex.git
synced 2025-07-18 23:02:09 +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:
@ -24,6 +24,10 @@
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Boost 1.32.1.</P>
|
||||
<UL>
|
||||
<LI>
|
||||
Fixed bug in partial matches of bounded repeats of '.'.</LI></UL>
|
||||
<P>Boost 1.31.0.</P>
|
||||
<UL>
|
||||
<LI>
|
||||
|
@ -24,6 +24,10 @@
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Boost 1.32.1.</P>
|
||||
<UL>
|
||||
<LI>
|
||||
Fixed bug in partial matches of bounded repeats of '.'.</LI></UL>
|
||||
<P>Boost 1.31.0.</P>
|
||||
<UL>
|
||||
<LI>
|
||||
|
@ -128,7 +128,7 @@ iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
|
||||
{
|
||||
if(STR_COMP(s1, p) <= 0)
|
||||
{
|
||||
while(*p)++p;
|
||||
do{ ++p; }while(*p);
|
||||
++p;
|
||||
if(STR_COMP(s1, p) >= 0)
|
||||
return set_->isnot ? next : ++next;
|
||||
@ -136,11 +136,11 @@ iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
|
||||
else
|
||||
{
|
||||
// skip first string
|
||||
while(*p)++p;
|
||||
do{ ++p; }while(*p);
|
||||
++p;
|
||||
}
|
||||
// skip second string
|
||||
while(*p)++p;
|
||||
do{ ++p; }while(*p);
|
||||
++p;
|
||||
}
|
||||
}
|
||||
@ -154,7 +154,7 @@ iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
|
||||
if(STR_COMP(s1, p) == 0)
|
||||
return set_->isnot ? next : ++next;
|
||||
// skip string
|
||||
while(*p)++p;
|
||||
do{ ++p; }while(*p);
|
||||
++p;
|
||||
}
|
||||
}
|
||||
|
@ -554,7 +554,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)), static_cast<unsigned>(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->greedy)
|
||||
|
@ -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