On Thursday 07 November 2002 4:51 pm, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | Perfect. Shame boost isn't as clever as sed. > > Actually it seems that boost is not far behind: > > string litex(".|*?+(){}[]^$\\"); > string fmt("\\\\$&"); > boost::RegEx reg("[]\\\\.|*?+(){}\\[^$]"); > string res = reg.Merge(litex, fmt); > cout << "In: " << litex << "\nOut: " << res << endl; > > It seems that only ']' and '\' need to be escaped. > (and the preprocessor help to make it look a bit ugly)
I can see that I got you interested in one of my games ;-) Could you apply it to biblio.C? Angus