Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML pattern Arabic letters

I want to insert the Arabic letters in the pattern just like the English letters

pattern="[a-zA-Z0-9-_. ]{1,30}"

I have no idea how to accomplish the action.

like image 947
user2303038 Avatar asked Apr 15 '26 03:04

user2303038


1 Answers

The range for Arabic and Persian are shared so this code could be used for Arabic too.

[أ-يa-zA-Z]

This is the reference for finding the character range of Unicode languages:

preg_replace and preg_match arabic characters

http://unicode.org/charts/

like image 87
Javascript Coder Avatar answered Apr 17 '26 17:04

Javascript Coder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!