
2 Mar
2011
2 Mar
'11
3:43 p.m.
On 1:59 PM, John Maddock wrote:
To your point of escaping a string wrong, I fiddled with a regex_replace() that would remove all '\E' (end-of-quoted-sequence), including '\\\E', but not touch '\\E' (i.e., even numbers of '\' prefixing), and couldn't get it.
I'm not sure I understand what you're trying to achieve there, can you explain?
I was going for different form, but (hopefully) same result as yours: std::string my_escaped_string = "\\Q" + regex_replace(my_string, e, "\\\\$&") + "\\E";