News for hackers. Stuff that matters.
Re:C++ Pattern Matching Proposal [pdf] by ape4 on Friday January 03, 2020 @11:06AM (#21947076)
I know this is different than the regex library but just thought I'd mention...

Declaring regex's like javaScript with be cool.

    var myre = /^hello\w*/;
    std::regex myre("^hello\\\w*");
Re:C++ Pattern Matching Proposal [pdf] by bstamour on Friday January 03, 2020 @11:55AM (#21947677)
You can add a literal operator:

    auto operator "" _r(char const* str, unsigned long) {
      return std::regex{str};
    }
To avoid all the backslashes, you can use a raw string literal:

    int main() {
      auto myre = R"(^hello\w*)"_r;
    }
Re:C++ Pattern Matching Proposal [pdf] by tambre on Friday January 03, 2020 @11:55AM (#21947674)
Use raw strings.

    std::regex myre(R"(^hello\w*)");