Using regular expressions in PHP, how can I make the user input Arabic, English, digits, _, -, or a space.
For example, the user can input the following strings:
To check for Arabic characters you can use
\p{InArabic}
This page might help you on your way.
Try this:
'/^([a-zA-Z0-9]|[\p{Arabic}]|[_])*$/u'