Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-08-07 10:47:50

Edward Diener wrote:
> You can turn on the literal flag type. All characters in your regular
> expression are treated as literals.

That doesn't help. Maybe an example clarifies what I need:

std::string s = "1.30.0";
boost::regex r( "^(.*)\s+(?:[Vv](?:ersion)?\s+" + s + ")\s*$" );

I need a way to convert 's' to '1\.30\.0', not to escape the whole regex.

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: daniel.frey_at_[hidden], web:

Boost list run by bdawes at, gregod at, cpdaniel at, john at