jeudi 22 août 2019

std::regex_error - Unexpected escape character

Given that this code works

std::string pattern = "(\\d+)";
std::regex iregex = std::regex(pattern, std::regex_constants::icase); 

I am getting a error for bellow code

std::string pattern = "(\\d+)";
std::regex iregex = std::regex(pattern, std::regex_constants::extended); 

can someone please explain the difference..??

Aucun commentaire:

Enregistrer un commentaire