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.

demo regex 101

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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

sql - Simple C# web application with a database -

c# - Abstract method in public abstract class implementing an internal interface doesn't compile? -