by ape4 · 6y ago · 0 comments
Declaring regex's like javaScript with be cool.
var myre = /^hello\w*/; std::regex myre("^hello\\\w*");
auto operator "" _r(char const* str, unsigned long) { return std::regex{str}; }
int main() { auto myre = R"(^hello\w*)"_r; }
std::regex myre(R"(^hello\w*)");