Skip to content

Instantly share code, notes, and snippets.

@alizadeh118
Created October 27, 2018 09:58
Show Gist options
  • Save alizadeh118/4eea446b2c95522a25f78d898544f939 to your computer and use it in GitHub Desktop.
Save alizadeh118/4eea446b2c95522a25f78d898544f939 to your computer and use it in GitHub Desktop.
Check if the string only includes persian characters
function isPersian(str) {
var p = /^[\u0600-\u06FF\s]+$/;
return p.test(str);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment