
7 Dec
2009
7 Dec
'09
4:24 p.m.
can, please, somebody explain, why this code doesn't work?
std::wstring str = L"Line \\n line \\n line \\n"; std::wstring result = L""; const boost::u32regex e = boost::make_u32regex(L"\\n"); std::wstring newText = L"\n"; result = boost::u32regex_replace(str, e, newText);
After launching result == str... :(((
You're replacing each occurrence of \\n with \\n, so the string at the end should be exactly the same! :-) Unless I'm missing something yours, John.