
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