[Boost-bugs] [Boost C++ Libraries] #4608: boost::regex accepts invalid regular expressions like "\\d++"

Subject: [Boost-bugs] [Boost C++ Libraries] #4608: boost::regex accepts invalid regular expressions like "\\d++"
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-08-29 07:34:44


#4608: boost::regex accepts invalid regular expressions like "\\d++"
-----------------------------------------+----------------------------------
 Reporter: gyk.net <gyk.net@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: regex |
-----------------------------------------+----------------------------------
 In programming languages that don't support possessive quantifier,eg.
 Python and C#,"\d++" is considered as an illegal nested quantifier.And in
 boost::xpressive,"\\d++" will raise a runtime exception.However,it's valid
 in boost::regex.

 {{{
 wchar_t* s = L"abc123" ;
 wregex e(L"\\d+++", boost::regex::normal) ;
 wcmatch m ;

 if(regex_search(s, m, e)){
     wcout << m[0] << endl ;
 }
 }}}

 The output is 123.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4608>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC