javascript - How to convert PHP regex to match Arabic characters to JS regex -
i have english , arabic regex in php , works fine php
but not working library formvalidation.io
~^[a-z0-9٠-٩\-+,()/'\s\p{arabic}]{1,}$~iu i need make work , convert js regex use in formvalidation regex.
the arabic regex is:
[\u0600-\u06ff] actually, ٠-٩ subset of arabic range, think can remove them pattern.
so, in js be
/^[a-z0-9+,()\/'\s\u0600-\u06ff-]+$/i see regex demo
Comments
Post a Comment