How To Convert Php Regex To Match Arabic Characters To Js Regex
I have this English and Arabic regex in php , it works fine with php But its not working with this library Formvalidation.io ~^[a-z0-9٠-٩\-+,()/'\s\p{Arabic}]{1,}$~iu I need t
Solution 1:
The Arabic regex is:
[\u0600-\u06FF]
Actually, ٠-٩
is a subset of this Arabic range, so I think you can remove them from the pattern.
So, in JS it will be
/^[a-z0-9+,()\/'\s\u0600-\u06FF-]+$/i
See regex demo
Post a Comment for "How To Convert Php Regex To Match Arabic Characters To Js Regex"