Created
August 17, 2017 02:02
-
-
Save rogerpoon/b9def3f5b8c2df74470a8af42433aefa to your computer and use it in GitHub Desktop.
We need a new regex standard besides POSIX BRE/ERE and ECMAScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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