PHP, although it does work with almost every single other regex validator
I've found on the internet, including
http://www.sweeting.org/mark/html/revalid.php and
http://www.koralsoft.com/regextester/ ...??
(\+\d{1,3} ?)?(\(\d{1,5}\)|\d{1,5}) ?\d{3} ?\d{0,7}
The code I'm using is:
Code: Select all
<?php
if (ereg('(\+\d{1,3} ?)?(\(\d{1,5}\)|\d{1,5}) ?\d{3} ?\d{0,7}','020 1234
5678'))
echo "match";
else
echo "no match";
?>For some reason it doesn't though, which may just be a problem with my
coding - bear in mind I haven't written anything in PHP for several years so
I'm a bit rusty.
Thanks!
Adam