I am using the code below to try and match symbols using regex, (as an example, I am trying to match the circle star symbol, http://graphemica.com/%E2%9C%AA)
#include <regex>
#include <iostream>
int main() {
std::wsmatch matches;
std::wstring x = L"✪";
// std::wregex e(L"(\\pS)+");
std::wregex e(L"([[:S:]]+)");
if (std::regex_match(x, matches, e))
{
// never reached
std::cout << "Never reached";
}
std::cout << "Bye.";
return 0;
}
The symbol ✪ (0x272A) is not matched, I also tried with other symbols and none of them work, (© for example).
I tried [:S:]
, \pS
and \p{S}
, none of them work, (the last one throws an exception)
This is a similar, (but not the same namespace), problem as the one as with the boost library, (Common symbols '\p{S}' not been 'matched' using boost wregex)