Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5223 closed Bugs (fixed)

boost::regex only accepts turning off one Perl modifier

Reported by: lpancescu@… Owned by: johnmaddock
Milestone: To Be Determined Component: regex
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

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++.

Attachments (1)

brtc.cpp (413 bytes) - added by lpancescu@… 6 years ago.
Test case

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by lpancescu@…

Test case

comment:1 Changed 6 years ago by lpancescu@…

  • Summary changed from boost::perl only accepts turning off one Perl modifier to boost::regex only accepts turning off one Perl modifier

comment:2 Changed 6 years ago by johnmaddock

  • Resolution set to fixed
  • Status changed from new to closed

(In [69775]) Fix bug that prevents turning off multiple Perl-modifiers at once. Fixes #5223.

comment:3 Changed 6 years ago by johnmaddock

(In [69776]) Update docs to reflect fixes for next release. Fixes #5223.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain johnmaddock.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.