std::string escape_regex(const std::string& s) { static const std::regex e("[\\[\\]$\\^|.+*?(){}]");
std::regex - seems I missed something! :o)
return regex_merge(s, e, "\\\\$&"); }
Just off the top of my head and untried....
I'll try and think up something more general that works with all the flag settings though...
As I said, it's not a problem for me to write such a function. I just think it should be part of the regex-library. This would allow a complete implementation which is maintained and which might also be tuned for performance as the above is obviously not the fastest implementation available :)
Regards, Daniel
-- Daniel Frey
aixigo AG - financial training, research and technology Schloß-Rahe-Straße 15, 52072 Aachen, Germany fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99 eMail: [EMAIL PROTECTED], web: http://www.aixigo.de
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost