Boost logo

Boost Users :

From: ivan_at_[hidden]
Date: 2007-04-25 20:43:21


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


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