
John Maddock wrote:
Is there a function to escape regex control characters like RegExp::escape already in boost::regex or perhaps boost::expressive?
No.... it depends upon the regular expression syntax as well, should be trivial to make a list of special characters and do a search and replace? Oh, and don't forget you can wrap the "literal" part of the expression in \Q ... \E which has the same effect.
Thanks John, I'm replacing the use of Qt's QRegExp with boost regex. QRegExp::escape was used to ensure that when the user selects from a list of single char delimiters, which has many of the regex control characters, can be used to split a string. So in this case a simple mapping function suffices. Thanks for the \Q ... \E info as well. Jeff