Boost C++ Libraries: Ticket #679: regex - perl syntax affects what gets matched https://svn.boost.org/trac10/ticket/679 <pre class="wiki">Hi, I'm trying to move from 1.32 to 1.33 (I need unicode), and it seems that 'what gets matched' have changed: it no longer matches the left-most longest match, but the first BFS of the expression. Ok. It is documented. But how do I pass that? The only way I found around it is using regex::no_perl_ex, but: 1. The change of 'what gets matched' is not documented (or I didn't find it), and therefore I'm not sure it does what I think it does. 2. There is no 'lookahead' anymore, and I need it. Is there a way to tell a perl regex to match the left- most longest? or is there another workaround? Thanks, Moddy. moddyt@itemfield.com </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/679 Trac 1.4.3 nobody Mon, 10 Jul 2006 09:03:32 GMT <link>https://svn.boost.org/trac10/ticket/679#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/679#comment:1</guid> <description> <pre class="wiki">Logged In: NO If you use the Perl syntax then you now get Perl matching rules. You can pass match_posix to the matching algorithms to force them to use leftmost-longest, but the behaviour is very hard to specify for Perl-expressions. Or you can compile the expression as a POSIX regex using regex::extended or regex::basic and then get well-defined leftmost longest behaviour with POSIX compatible expressions. The problem is that mixing Perl syntax and leftmost longest rules leads to all kinds of problems when you try and figure out what a "non-greedy-repeat" should do for example. There are similar issues with other Perl extensions. HTH, John. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>nobody</dc:creator> <pubDate>Mon, 24 Jul 2006 11:14:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/679#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/679#comment:2</guid> <description> <pre class="wiki">Logged In: NO Thanks. I'll try that. I'm still left with one question: Where are the flags "match_posix" and "no_perl_ex" appear documentated? Thanks, Moddy. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Daryle Walker</dc:creator> <pubDate>Fri, 03 Aug 2007 12:11:22 GMT</pubDate> <title>component changed; severity set https://svn.boost.org/trac10/ticket/679#comment:3 https://svn.boost.org/trac10/ticket/679#comment:3 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">regex</span> </li> <li><strong>severity</strong> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket John Maddock Mon, 13 Aug 2007 17:48:15 GMT status, resolution, description changed https://svn.boost.org/trac10/ticket/679#comment:4 https://svn.boost.org/trac10/ticket/679#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">fixed</span> </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/679?action=diff&amp;version=4">diff</a>) </li> </ul> <p> Sorry for the delay: no_perl_ex is intended for internal use and intentionally not documented. The new match_flag_type options I've just added to the docs in SVN now. </p> Ticket