Given an utf8 string, how to know it contain specified characters which don't allowed?
The demand is the utf8 string only can contain English characters and Chinese characters. Any other characters like symbols, numbers, white space, '\n' ... are disallowed.
Dose std::regex can do this job?
bool legal(const std::string& s) { // s is utf8 string
//??
}