How to check if any Arabic character exists in the string ( javascript )

According to Wikipedia, Arabic characters fall in the Unicode range 0600 – 06FF. So you can use a regular expression to test if the string contains any character in this range:

var arabic = /[\u0600-\u06FF]/;
var string = 'عربية‎'; // some Arabic string from Wikipedia

alert(arabic.test(string)); // displays true

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)