The value of name
is: regex101: build, test, and debug regex - 3 running windows
im trying to remove everything forward the last -
std::wstring name = accvector[i].name;
std::wregex regexp(L".*\\K( -\\s \\d \\srunning.*$)");
name = std::regex_replace(name, regexp, L"");
nothing is being replace, whats wrong?
CodePudding user response:
Note you do not need the $
at the end of the pattern, .*
matches till the end of the line/string.