
8 Dec
2009
8 Dec
'09
10:48 a.m.
The replacement is "\n" not "\\n" so the '\' followed by 'n' in str should be replaced with a newline, right?
No, a regular expression of \\n matches a single newline character - the first \ is swallowed by the compiler, then Boost.Regex gets to see the expression "\n" which it interprets as "match a newline". John.