EPH EPH - 1 year ago 75
Javascript Question

Java script Regex for mobile number vaidation (convert from PHP)?

Can somebody help me with converting a php regex to javascript regex?

It would be great and I would be appreciate you if you can help me, because I'm not so strong in regex.

preg_match('/^(((\+|00|۰۰)98|۹۸)|[0۰])?[9۹][01239۰۱۲۳۹]\d{8}$/u', $phone) == 0 )

This code is executed very well in PHP but not working in JavaScript
I search and research long time but i never find any useful answer.

please help to convert this php regex to javascript regex. . .
thanks a lot

Answer Source


Unfortunately, someone here did not help. I had read several articles about regular expressions And luckily I could solve my problem . and Answer the question is:


The answer may be useful for those who have the same problem lead . . .

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download