#5223 closed Bugs (fixed)
boost::regex only accepts turning off one Perl modifier
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
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)
Change History (4)
by , 12 years ago
comment:1 by , 12 years ago
Summary: | boost::perl only accepts turning off one Perl modifier → boost::regex only accepts turning off one Perl modifier |
---|
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Test case