25 Mar
2003
25 Mar
'03
12:21 p.m.
static const boost::regex re1("jou"); static const boost::regex re1("jau"); static const boost::regex re1("nch"); static const std::string fs1("sju"); static const std::string fs2("sjo"); static const std::string fs3("ngk");
std::string res = regex_merge( regex_merge( regex_merge(input_string, re1, fs1) , re2, fs2) , re3, fs3);
Have you thought about combining these into one big regex: static const boost::regex e("(jou)|(jau)|(nch)"); static const std::string format_string("(?1sju)(?2sjo)(?3ngk)"); // conditional format string regex_merge(input_string, e, format_string); // search and replace everything at once John.