Boost logo

Boost Users :

Subject: Re: [Boost-users] [Regex] This pattern compiles fine for Perl andPCREbut not for Boost Regex
From: David Dawe (DDawe_at_[hidden])
Date: 2010-10-19 23:15:22


On 10/19/2010 5:48 AM, John Maddock wrote:
>>Is there a way in Boost Regex to interpret a "{" as a literal
character
>>in the above context in a Perl regular expression, while still
allowing the
>> "{n,m}" bounded repeat in places where it is syntactically valid?
>
>Yep, just escape the { and } and use \{abc\} which will work the same
in
>Perl/PCRE and Boost.

I had already been using \{ and \} to temporarily work around the
difference
with PCRE (and Perl) but was hoping to use Boost Regex as a drop-in
replacement.
This is because some of the regular expressions are specified outside
the
software, in existing configuration files.

>I hadn't realised Perl worked like that, can you file a bug report at
>svn.boost.org so I don't forget this?

Certainly. Will do.

As suggested by Eric Niebler, I will also try out Boost Xpressive.

Thanks everyone for your timely responses.

DD


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net