mirror of
https://github.com/boostorg/regex.git
synced 2025-07-13 04:16:37 +02:00
regex: Fixed spurious matches when grepping with .*
[SVN r9686]
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
Version 305:
|
||||
FIXED: SunPro 6.1 support
|
||||
FIXED: Spurious extra matches at the end of input when grepping with .*
|
||||
|
||||
Version 304:
|
||||
FIXED: Missing this-> prefix to some symbols in cpp_regex_traits.cpp
|
||||
CHANGED: Error reporting for wide character tests.
|
||||
@ -238,5 +242,6 @@ BUG: character sets don't function correctly when regbase::char_classes
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -762,6 +762,8 @@ a+ "...aaa,,," $0 aaa
|
||||
a+ "...aaa,,," $1 ""
|
||||
a+ "...aaa,,," $15 ""
|
||||
(a+)b+ "...aaabbb,,," $1 aaa
|
||||
[[:digit:]]* 123ab <$0> <123><><><>
|
||||
[[:digit:]]* 123ab1 <$0> <123><><><1>
|
||||
|
||||
; and now escapes:
|
||||
a+ "...aaa,,," $x "$x"
|
||||
@ -868,3 +870,4 @@ a+(?#b+)b+ xaaabbba 1 7
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1113,6 +1113,8 @@ unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<char
|
||||
++cmatches;
|
||||
if(foo(m) == false)
|
||||
return cmatches;
|
||||
if(m[0].second == last)
|
||||
return cmatches;
|
||||
// update to end of what matched
|
||||
// trying to match again with match_not_null set if this
|
||||
// is a null match...
|
||||
@ -1201,6 +1203,8 @@ unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<char
|
||||
pd.temp_match.init_fail(next_base, last);
|
||||
m.init_fail(next_base, last);
|
||||
j = 0;
|
||||
if(m[0].second == last)
|
||||
return cmatches;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1213,6 +1217,8 @@ unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<char
|
||||
++cmatches;
|
||||
if(foo(m) == false)
|
||||
return cmatches;
|
||||
if(m[0].second == last)
|
||||
return cmatches;
|
||||
// update to end of what matched
|
||||
_skip_and_inc(clines, last_line, first, m[0].second);
|
||||
next_base = m[0].second;
|
||||
@ -1247,6 +1253,8 @@ unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<char
|
||||
++cmatches;
|
||||
if(foo(m) == false)
|
||||
return cmatches;
|
||||
if(m[0].second == last)
|
||||
return cmatches;
|
||||
// update to end of what matched
|
||||
// trying to match again with match_not_null set if this
|
||||
// is a null match...
|
||||
@ -1336,6 +1344,8 @@ unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<char
|
||||
++cmatches;
|
||||
if(foo(m) == false)
|
||||
return cmatches;
|
||||
if(m[0].second == last)
|
||||
return cmatches;
|
||||
// update to end of what matched
|
||||
// trying to match again with match_not_null set if this
|
||||
// is a null match...
|
||||
@ -1412,6 +1422,8 @@ unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<char
|
||||
++cmatches;
|
||||
if(foo(m) == false)
|
||||
return cmatches;
|
||||
if(m[0].second == last)
|
||||
return cmatches;
|
||||
// update to end of what matched
|
||||
// trying to match again with match_not_null set if this
|
||||
// is a null match...
|
||||
@ -1472,6 +1484,8 @@ unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<char
|
||||
++cmatches;
|
||||
if(foo(m) == false)
|
||||
return cmatches;
|
||||
if(m[0].second == last)
|
||||
return cmatches;
|
||||
// update to end of what matched
|
||||
// trying to match again with match_not_null set if this
|
||||
// is a null match...
|
||||
|
Reference in New Issue
Block a user