I have a regular console registration form:
void register_1() { string login, parol; cout << "Введите логин:" << endl; cin >> login; cout << "Введите пароль:" << endl; cin >> parol; ofstream fout("users.txt", ios::app); fout << login << " " << parol << endl; cout << "Регистрация прошла успешно!" << endl; main(); } Before writing to the file, I need to check the correctness of the input so that there are such parameters: Russian capital letters and small letters from A to Z and special characters:. , *% I thought to create an array of such characters and run it through for () if (), but this is a bad idea (help please!
std::regex_matchforstd::wregexform[а-яА-Я\.,\*%]- cpp questionsstd::regex_matchchecks with the help of the regular expression[а-яА-Я\.,\*%], represented by the classstd::wregex, whether a certain string corresponds to this regular expression. All of this for C ++ is described here - cpp questions