All regular expressions found here should be PCRE compatible.

Test for valid IPv4 address
/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
    Regex flavors: .NET, Java, JavaScript, PCRE, Perl, Python, Ruby

 


Validate international phone numbers in EPP format
    ^\+[0-9]{1,3}\.[0-9]{4,14}(?:x.+)?$
    Regex flavors: .NET, Java, JavaScript, PCRE, Perl, Python, Ruby

 


See Also

http://blog.stevenlevithan.com/archives/validate-phone-number

Share

0 Comments

Leave a Reply

%d bloggers like this: