I need to validate English / Arabic letters only with spaces in a textbox. I used below validation expressions, it accepts English / Arabic text, But it did not accept any spaces. Can anyone give me the right expression.
^[\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z]+[\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z-_]*$
It is called a
Regular Expression
. To allow whitespaces, you need to add a whitespace to the set.^[\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z-_ ]+$
This Regular Expression accepts English, Arabic letters and whitespaces. It also accetps only whitespace with no letters.