
26 Apr
2007
26 Apr
'07
12:43 a.m.
Hi I am trying to use boost::regex_replace but I am having trouble understanding the format to use for the the format string. The Ecma-262.pdf rules for how to create a format string seem quite terse. Does anyone know of a reference that has some more examples? Here is the code I am trying to write: #include <boost/regex.hpp> #include <string> #include <iostream> int main(int argc, char** argv) { std::string str; boost::regex expression("abc"); std::string fmt(""); // WHAT GOES HERE? fn = "abcabcabc"; boost::regex_replace(str, expression, fmt); std::cout << str << std::endl; return 0; } Thank you, Ivan Novick http://www.0x4849.net