https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61424
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- A slight variation: #include <regex> #include <iostream> using namespace std; int main() { regex_constants::syntax_option_type grammar[] = { regex_constants::ECMAScript, regex_constants::extended, regex_constants::awk, regex_constants::egrep }; for (auto g : grammar) { regex re("tour|tournament|tourn", g); const char str[] = "tournament"; cmatch m; if (regex_search(str, m, re)) cout << m[0] << endl; else cout << "-" << endl; } } ECMAscript should match "tour", the POSIX ERE grammars should match "tournament" Instead we match "tourn" for all grammars.