[Boost-bugs] [Boost C++ Libraries] #5223: boost::perl only accepts turning off one Perl modifier

Subject: [Boost-bugs] [Boost C++ Libraries] #5223: boost::perl only accepts turning off one Perl modifier
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-24 11:15:26


#5223: boost::perl only accepts turning off one Perl modifier
--------------------------------------+-------------------------------------
 Reporter: lpancescu@… | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.45.0 | Severity: Problem
 Keywords: |
--------------------------------------+-------------------------------------
 I'm trying to use modifiers with the extended Perl syntax. Turning on
 multiple modifiers seems to work fine, but turning them off only seems to
 accept a single modifier after the '-':

 #include <iostream>
 #include <boost/regex.hpp>

 int main()
 {
     using std::cerr;
     using boost::regex;
     using boost::regex_error;

     try
     {
         regex m1("(?xism:\\d)", regex::perl); // ok
         regex m2("(?-x:\\d)", regex::perl); // ok
         regex m3("(?-xism\\d)", regex::perl); // bad regexp
     }
     catch (boost::regex_error err)
     {
         cerr << "Bad regular expression: " << err.what() << "\n";
     }
 }

 I'm using Boost 1.45 from MacPorts on Mac OS X 10.6.6, trying to "port"
 some Perl code to C++.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5223>
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:05 UTC