A regular expression that can be used to match and validate Arabic characters in a string.
/^[\u0621-\u064A]+$/
With Numbers:
Use this regex instead if you’re looking for a Regex to match Arabic characters and 1-9 numbers:
/^[\u0621-\u064A0-9 ]+$/
Or with Arabic numbers.
/^[\u0621-\u064A\u0660-\u0669 ]+$/
Matches:
- ب
- ت
- خ
Non-matches:
- a
- 1
- A
See Also:
- Special Characters Regular Expression
- Regular Expression To Match Chinese Characters
- Regular Expressions To Match Common Special Characters (Unicode Symbols)
- Regular Expression To Match Russian Cyrillic Characters
- Regular Expression To Match Persian Characters
- Regular Expression To Match Accented Characters
- Regular Expression To Match Hebrew And English Characters
- Regular Expression To Match All Greek & Latin Characters