Regular Expression Arabic characters and numbers only

You can use:

^[\u0621-\u064A\s\p{N}]+$

\p{N} will match any unicode numeric digit.

To match only ASCII digit use:

^[\u0621-\u064A\s0-9]+$

EDIT: Better to use this regex:

^[\p{Arabic}\s\p{N}]+$

RegEx Demo


Just add 1-9 (in Unicode format) to your character-class:

^[\u0621-\u064A0-9 ]+$

OR add \u0660-\u0669 to the character-class which is the range of Arabic numbers :

^[\u0621-\u064A\u0660-\u0669 ]+$

use this

[\u0600-\u06FF]

it worked for me on visual studio

enter image description here


you can use [ء-ي] it worked for me in javascript Jquery forme.validate rules

for my example I want to force user to insert 3 characters

[a-zA-Zء-ي]