Boost logo

Boost :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2005-06-20 08:08:26


On 6/20/05, Eric Niebler <eric_at_[hidden]> wrote:

> The situation of interest is described in the ECMAScript specification
> (ECMA-262), section 15.10.2.15:
>
> "Even if the pattern ignores case, the case of the two ends of a range
> is significant in determining which characters belong to the range.
> Thus, for example, the pattern /[E-F]/i matches only the letters E, F,
> e, and f, while the pattern /[E-f]/i matches all upper and lower-case
> ASCII letters as well as the symbols [, \, ], ^, _, and `."
>
> A more interesting case is what should happen when doing a
> case-insentitive match on a range such as [Z-a]. It should match z, Z,
> a, A and the symbols [, \, ], ^, _, and `. This is not what happens with
> Boost.Regex (it throws an exception from the regex constructor).

Not meaning to be facetious, but why in heavens name would anyone want
to use a character class like [E-f] or [Z-a]? Seriously, does anyone
write regexps like this?

-- 
Caleb Epstein
caleb dot epstein at gmail dot com

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