[Boost-bugs] [Boost C++ Libraries] #13493: boost::regex doesn't accept a regular expression anymore

Subject: [Boost-bugs] [Boost C++ Libraries] #13493: boost::regex doesn't accept a regular expression anymore
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-03-26 12:35:15


#13493: boost::regex doesn't accept a regular expression anymore
-------------------------------+--------------------------
 Reporter: sebastian.panek@… | Owner: John Maddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.66.0 | Severity: Regression
 Keywords: |
-------------------------------+--------------------------
 I recently switched from Boost 1.61 to Boost 1.66 and discovered the
 following problem with boost::regex in 1.66:
 A regular expression is recognized as erroneous, i. e. after construction
 boost::regex::status() returns a value != 0, but the same expression was
 accepted in previous boost versions. Calling boost::regex_search() with
 such a erroneous boost::regex object leads to a crash.

 The expression is:

 {{{
 ([0-9]*)\.([0-9]*)(\.([0-9]*)(\.([0-9]*))?)?

 }}}

 My C++ code looks as follows:

 {{{
 static const boost::regex versionRegex(
 "([0-9]*)\\.([0-9]*)(\\.([0-9]*)(\\.([0-9]*))?)?" );
 assert( versionRegex.status() == 0 && "the regular expression must be
 valid" );

 }}}

 After switching the boost version to 1.66 the assertion above fails.

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13493>
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 : 2018-03-26 12:41:19 UTC