Boost C++ Libraries: Ticket #5223: boost::regex only accepts turning off one Perl modifier https://svn.boost.org/trac10/ticket/5223 <p> 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 '-': </p> <p> #include &lt;iostream&gt; #include &lt;boost/regex.hpp&gt; </p> <p> int main() { </p> <blockquote> <p> using std::cerr; using boost::regex; using boost::regex_error; </p> </blockquote> <p> </p> <blockquote> <p> try { </p> <blockquote> <p> regex m1("(?xism:<br />d)", regex::perl); <em> ok regex m2("(?-x:<br />d)", regex::perl); </em> ok regex m3("(?-xism<br />d)", regex::perl); <em> bad regexp </em></p> </blockquote> <p> } catch (boost::regex_error err) { </p> <blockquote> <p> cerr &lt;&lt; "Bad regular expression: " &lt;&lt; err.what() &lt;&lt; "\n"; </p> </blockquote> <p> } </p> </blockquote> <p> } </p> <p> I'm using Boost 1.45 from <a class="missing wiki">MacPorts</a> on Mac OS X 10.6.6, trying to "port" some Perl code to C++. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5223 Trac 1.4.3 lpancescu@… Thu, 24 Feb 2011 11:17:59 GMT attachment set https://svn.boost.org/trac10/ticket/5223 https://svn.boost.org/trac10/ticket/5223 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">brtc.cpp</span> </li> </ul> <p> Test case </p> Ticket lpancescu@… Thu, 24 Feb 2011 11:21:51 GMT summary changed https://svn.boost.org/trac10/ticket/5223#comment:1 https://svn.boost.org/trac10/ticket/5223#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">boost::perl only accepts turning off one Perl modifier</span> → <span class="trac-field-new">boost::regex only accepts turning off one Perl modifier</span> </li> </ul> Ticket John Maddock Wed, 09 Mar 2011 18:12:26 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5223#comment:2 https://svn.boost.org/trac10/ticket/5223#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/69775" title="Fix bug that prevents turning off multiple Perl-modifiers at once. ...">[69775]</a>) Fix bug that prevents turning off multiple Perl-modifiers at once. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5223" title="#5223: Bugs: boost::regex only accepts turning off one Perl modifier (closed: fixed)">#5223</a>. </p> Ticket John Maddock Wed, 09 Mar 2011 18:16:17 GMT <link>https://svn.boost.org/trac10/ticket/5223#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5223#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/69776" title="Update docs to reflect fixes for next release. Fixes #5223.">[69776]</a>) Update docs to reflect fixes for next release. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5223" title="#5223: Bugs: boost::regex only accepts turning off one Perl modifier (closed: fixed)">#5223</a>. </p> </description> <category>Ticket</category> </item> </channel> </rss>