I thought that std::regex
was ECMAScript compatible. However, that does not seem to be true, at least not by default, e.g.
The expression :user
will match asd:user
in Javascript but not with std::regex
while .*:user
will match.
What is the cause for the difference and is there any flags or options I can pass to std::regex
and/or std::regex_match
to make std::regex
behave exactly like Javascript RegExp
?