dimanche 29 mars 2015

Regex: Java->C++11

I'm trying to port this java line:



Pattern P = Pattern.compile("[\uD800\uDC00-\uDB7F\uDFFF]");


into c++11:



typedef std::regex<std::wstring> Pattern;
Pattern P("[\uD800\uDC00-\uDB7F\uDFFF]");


but I get:



error: invalid universal character "[\uD800\uDC00-\uDB7F\uDFFF]"


The java source i'm porting is http://ift.tt/1G51LkK


I'm not an expert with encoding and regexp tricks and standards. Your help will be very appreciated :)


Thanks!


Aucun commentaire:

Enregistrer un commentaire