note 57127 deleted from function.ereg by nlopess

From: Date: Sun, 02 Oct 2005 17:57:36 +0000
Subject: note 57127 deleted from function.ereg by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96208@lists.php.net to get a copy of this message
Note Submitter: admin at str-atm dot com ---- Here are some common ereg strings I used on our web site: US and Canada phones (1-555-555-5555 format) ^[0-9][-][0-9][0-9]{2}[-][0-9][0-9]{2}[-][0-9]{4}$ Integer values ^[0-9]+$ Canada Zip codes (G1C 1C1 format) ^[A-Z][0-9][A-Z][ ][0-9][A-Z][0-9]$ Email and SMS adresses: ^[a-z0-9][-_a-z0-9]*([.][-_a-z0-9]+)*[@]([a-z][.])? [a-z0-9][-_a-z0-9]*[.][a-z]{2,4}([.][a-z]{2,4})*$ First names and Last names ^[A-ZÄÁÂÀËÉÊÈÏÍÎÌÖÓÔÒÜÚÛÙÇ][a-zäáâàëéêèïíîìöóôòüúûùç]+ ([- ][A-ZÄÁÂÀËÉÊÈÏÍÎÌÖÓÔÒÜÚÛÙÇ][a-zäáâàëéêèïíîìöóôòüúûùç]+){0,2}$ Websites URL without arguments, login, password and port ^[h][t][t][p][:][/][/][a-z0-9][-_a-z0-9]* ([.][-_a-z0-9]+)?([.][a-z]{2,4}){1,2}$ I'm pretty sure they are not perfect but they work fine for us. I hope they will be useful to you! Andre Lebeuf STR ATMs and Terminals

« previous php.notes (#96208) next »