Opened 15 years ago

Closed 14 years ago

#1081 closed Bugs (fixed)

Empty string rejected as perl-style regex

Reported by: Christopher.Dunn@… Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Severity: Problem
Keywords: perl empty string Cc:

Description

"" is a valid Perl-style regular expression. It means "match anything". boost::regex throws an exception when this is compiled.

How difficult would it be to allow the empty string?

Change History (1)

comment:1 by John Maddock, 14 years ago

Resolution: fixed
Status: newclosed

(In [50374]) Empty expressions, and empty alternatives are now allowed when using the Perl regular expression syntax. This change has been added for Perl compatibility, when the new [syntax_option_type] ['no_empty_expressions] is set then the old behaviour is preserved and empty expressions are prohibited. This is issue [@https://svn.boost.org/trac/boost/ticket/1081 #1081].

Fixes #1081.

Note: See TracTickets for help on using tickets.