fork(3) download
  1. #include <iostream>
  2. #include <string>
  3. #include <regex>
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. std::wstring str = L"Приветпривет";
  8. std::wsmatch result;
  9. std::wregex regex(L"[А-я]+");
  10. bool res = regex_match(str.cbegin(), str.cend(), result, regex);
  11. std::cout << std::boolalpha << res << std::endl;
  12. }
Success #stdin #stdout 0s 4404KB
stdin
Standard input is empty
stdout
true