I tried to use C ++ 11 regex but failed even in trivial examples. From the outside, it seems that only strings are compared, for example:
std::regex_match(std::string{""}, std::regex{"a?"})
In contrast, the regexp Boost library behaves as I expected:
boost::regex_match(std::string{""}, boost::regex{"a?"})
I tested GCC 4.8.2 and clang 3.4 (also using the GCC STL library). Either the library is broken, or I donโt understand the syntax defined by the C ++ 11 standard.
Philipp Claรen
source share