Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-10-09 07:43:57


Dima Kagan wrote:
> Hi,
>
> I'm currently evaluating the Regex package and encountered a minor
> issue.
> I need to match a string that can contain some special characters
> (.[{()\*+?|^$) as well.
> My question is if there is a way to tell Regex to treat this string
> "as is", including the special characters? I need to do this without
> escaping the special characters in the string or the match
> expression.
> For those of you familiar with Tcl Expect, I'm looking for an option
> similar to "expect -ex".

boost::regex e(mystring, boost::regex::literal);

HTH, 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