|
Boost-Commit : |
From: john_at_[hidden]
Date: 2008-08-17 07:15:07
Author: johnmaddock
Date: 2008-08-17 07:15:07 EDT (Sun, 17 Aug 2008)
New Revision: 48185
URL: http://svn.boost.org/trac/boost/changeset/48185
Log:
Fix for issue #2188.
Text files modified:
trunk/boost/regex/v4/perl_matcher_non_recursive.hpp | 4 +++-
trunk/libs/regex/test/regress/test_tricky_cases.cpp | 3 +++
2 files changed, 6 insertions(+), 1 deletions(-)
Modified: trunk/boost/regex/v4/perl_matcher_non_recursive.hpp
==============================================================================
--- trunk/boost/regex/v4/perl_matcher_non_recursive.hpp (original)
+++ trunk/boost/regex/v4/perl_matcher_non_recursive.hpp 2008-08-17 07:15:07 EDT (Sun, 17 Aug 2008)
@@ -477,7 +477,9 @@
take_second = can_start(*position, rep->_map, (unsigned char)mask_skip);
}
- if(take_first || (next_count->get_id() != rep->id))
+ if((m_backup_state->id != saved_state_repeater_count)
+ || (static_cast<saved_repeater<BidiIterator>*>(m_backup_state)->count.get_id() != rep->id)
+ || (next_count->get_id() != rep->id))
{
// we're moving to a different repeat from the last
// one, so set up a counter object:
Modified: trunk/libs/regex/test/regress/test_tricky_cases.cpp
==============================================================================
--- trunk/libs/regex/test/regress/test_tricky_cases.cpp (original)
+++ trunk/libs/regex/test/regress/test_tricky_cases.cpp 2008-08-17 07:15:07 EDT (Sun, 17 Aug 2008)
@@ -377,6 +377,9 @@
TEST_REGEX_SEARCH("(?:\\d{9}.*){2}", perl, "123456789dfsdfsdfsfsdfds123456789b", match_default, make_array(0, 34, -2, -2));
TEST_REGEX_SEARCH("(?:\\d{9}.*){2}", perl, "123456789dfsdfsdfsfsdfds12345678", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("(?:\\d{9}.*){2}", perl, "123456789dfsdfsdfsfsdfds", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])(\\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])){3}$", perl, "1.2.03", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])(\\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])){3,4}$", perl, "1.2.03", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])(\\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])){3,4}?$", perl, "1.2.03", match_default, make_array(-2, -2));
//
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk