samedi 23 juillet 2016

Common symbols '\pS' not been 'matched' using std::wregex

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://ift.tt/2a3Ized)

#include <regex>

std::smatch matches;
std::string x = "✪";
//  std::wregex e(L"(\\pS)+");
std::wregex e(L"([[:S:]]+)");
if (std::wregex_match(x, matches, e))
{
   // never reached
}

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)

Aucun commentaire:

Enregistrer un commentaire