note 40094 rejected from function.ereg by curt
| From: | curt@php.net | Date: | Tue, 06 Jul 2004 03:53:56 +0000 |
| Subject: | note 40094 rejected from function.ereg by curt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72677@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Here are some examples that I have done:
Check a US Phone Number: (xxx) xxx-xxx OR xxx-xxx-xxx
^([2-9][0-9]{2}-[2-9][0-9]{2}-[0-9]{4}|\([2-9][0-9]{2}\)\ [2-9][0-9]{2}-[0-9]{4})$
Check a Username or Password (Letters and Numbers only, first character must be a letter, 4 to 36
characters in length).
^[a-bA-B][a-bA-B0-9]{3,35}$
Check an email address
'^[a-zA-Z0-9_\.\-]{1,*}@[a-zA-Z0-9_\.\-]{2,*}.[a-zA-Z]{2,4}$';
I hope thease can help some people out there :)