Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2006-08-09 13:29:34


gast128 wrote:
> John Maddock <john <at> johnmaddock.co.uk> writes:
>> It works on iterators, and on comparisons between characters.
>>
>> You could define your own traits class so that say: a character 'a'
>> in your regex would always match any of [abc] in the string.
>
> I can try this, but a first shot didn't compile. So I was wondered if
> this all together was possbile, but probably I should give it another
> try. In the end I could always write a simple regex myself(a la CUJ
> 'A Different Interpretation of the Interpreter Design Pattern'), but
> that's what I want to avoid.

The easiest way is to define a traits class that inherits from regex_traits
and over-rides the definition of translate() and/or translate_nocase().

John.


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