https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71500
--- Comment #3 from Michael Duggan <mwd at md5i dot com> --- Still fails for the following code: #include <iostream> #include <regex> #include <string> using namespace std; void check(const string& s, regex re) { cout << s << " : " << (regex_match(s, re) ? "Match" : "Nope") << endl; } int main() { regex re1 = regex("[T-f]+", regex::icase); check("aaa", re1); /* expect match */ check("AAA", re1); /* expect match */ check("fff", re1); /* expect match */ check("FFF", re1); /* expect match */ check("ttt", re1); /* expect match */ check("TTT", re1); /* expect match */ check("uuu", re1); /* expect match */ check("UUU", re1); /* expect match */ check("ggg", re1); /* expect no match */ check("GGG", re1); /* expect no match */ } Current output: aaa : Nope AAA : Nope fff : Nope FFF : Nope ttt : Nope TTT : Nope uuu : Nope UUU : Nope ggg : Nope GGG : Nope