3 Dec
2004
3 Dec
'04
2:25 p.m.
On Fri, 3 Dec 2004 14:00:01 +0100, Leon Mergen
Hello,
I'm trying to use boost regex'es replace and add a trailing 0 after the \1 part. However, it seems to want to replace this with \10, which is not what I want.
Anyone has any idea how to do this in a proper way ?
Thanks in advance!
Regards,
Leon Mergen
If you use the 'format_all' flag, you can use something like ($1)0 as a format string. For example, boost::regex_replace(std::string("Hello"), boost::regex("([a-zA-Z]+)"), "[($1)0]", boost::regex_constants::format_all); yeilds the string "[Hello0] HTH Stuart Dootson