Skip to content

Instantly share code, notes, and snippets.

@rogerpoon
Created August 17, 2017 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogerpoon/b9def3f5b8c2df74470a8af42433aefa to your computer and use it in GitHub Desktop.
Save rogerpoon/b9def3f5b8c2df74470a8af42433aefa to your computer and use it in GitHub Desktop.
We need a new regex standard besides POSIX BRE/ERE and ECMAScript
// ECMAScript regex
std::regex re_param(R"((\S+)\s+([\s\S]+))");
// vs.
// PCRE
pcrecpp::RE re_param(
"(?# Match the annotation name)(\\S+)"
"(?# Skip over whitespace)\\s+"
"(?# Match the annotation description text)([\\s\\S]+)"
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment