This
std::regex line(\"[\\s]+\\+?[0-9]+.[0-9]+[\\s]+\\+?[0-9]+.[0-9]+[\\s]+\\+?[0-9]+.[0-9]+[\\s]\");
line causes this
Exceptio
You either need to escape the back slashes with \\
(two for one), or use a raw string literal like this:
regex line{R"([\s]+\+?[0-9]+.[0-9]+[\s]+\+?[0-9]+.[0-9]+[\s]+\+?[0-9]+.[0-9]+[\s])"};
Raw string literals surround the string with (at least) R"(
and )"
.
Read more about raw string literals HERE - Syntax (6).