Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2007-06-02 04:55:38


impulse9 wrote:
> Disallowing these would do more bad than good. Buggy regular
> expressions
> are quite easy to write, even without '|)'

True!

> Using |) is quite intuitive. We have a lot of cases than some
> symbol(s) may or may not be present, and this is a natural way to say
> that.
> Moreover it makes regular expressions more flexible.
>
> This is from http://en.wikipedia.org/wiki/Regular_expression
>
> [QUOTE]
> Regular expressions are particularly useful in the production of code
> completion systems and syntax highlighting in integrated development
> environments (IDEs).
>
> For example:
> (public|private|protected|)\s*(\w+)\s+(\w+)\s*\(
>
> as used to match type declarations in source code (see also, Regular
> expression examples ). [/QUOTE]
>
> Alternatives are just alternatives. Or should we assume that
> boost::regex is only Perl6+ compatible?

It's a trivial change to make, but let me think this through...

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk