I need regular expression which allow only alphabets of any language but doesn't allow special characters and numbers. Right now i am using this express but it doesn't work in Arabic language
^(?=.{1,})[a-zA-Z'.\s]{1,50}$
I need regular expression which allow only alphabets of any language but doesn't allow special characters and numbers.
You can use \p{L} which matches any kind of letter from any language.
^[\p{L}\s]{1,50}$
If you need to match ' and dot . as well, just add them to the character class.
^[\p{L}\s'.]{1,50}$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With