9 Aug
2006
9 Aug
'06
5:29 p.m.
gast128 wrote:
John Maddock
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.