lundi 20 avril 2020

std::regex_match with characters é è à

I want for example to consider "ram" , "rém" , "rèm" and "ràm" as a valid input, so i do this:

std::string ss = "rém";
bool valid = std::regex_match(ss, std::regex("r[aéèà]m"));

but in this case 'valid' returns false, is there something special with the characters é, è and à ? Should i modify the regex expression ? Thanks

Aucun commentaire:

Enregistrer un commentaire