fork download
  1. #include <iostream>
  2. #include <regex>
  3.  
  4. int main() {
  5. std::string strFieldVal("المتحدة");
  6. std::regex pattern("[\u0600-\u06FF\u0750-\u077F]+");
  7. if (std::regex_match(strFieldVal, pattern))
  8. {
  9. std::cout << strFieldVal << " is Arabic.\n";
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0s 4936KB
stdin
Standard input is empty
stdout
المتحدة is Arabic.