Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2340: Regex : Invalid preceding regular expression problem
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-09-18 16:15:36
#2340: Regex : Invalid preceding regular expression problem
--------------------------------+-------------------------------------------
Reporter: jcombe_at_[hidden] | Owner: johnmaddock
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: regex
Version: Boost 1.36.0 | Severity: Problem
Resolution: wontfix | Keywords: regex
--------------------------------+-------------------------------------------
Changes (by johnmaddock):
* status: new => closed
* resolution: => wontfix
Comment:
In a strict sense this is a bug (in the sense that Perl accepts it and we
don't), but the problematic part of the original regular expression is
meaningless:
\b?
means "maybe match a word boundary, or maybe don't bother", so either way
it consumes zero characters and will *always* succeed. The alternative
form (which is also an error in Boost.Regex):
\b+
Is also rather meaningless and exactly equivalent to
\b
My gut feeling at present, is that these almost always represent errors in
the regular expression, and are generally best diagnosed as such. But...
please do reopen if you can think of a legitimate use case :-)
HTH, John.
-- Ticket URL: <http://svn.boost.org/trac/boost/ticket/2340#comment:1> 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:49:58 UTC