note 56101 added to ref.regex
| From: | ajd at cloudiness dot com | Date: | Tue, 23 Aug 2005 16:05:30 +0000 |
| Subject: | note 56101 added to ref.regex | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94082@lists.php.net to get a copy of this message | ||
A minor tweak to trucex' phone validator, because some people use a dot separator between the
area code, exchange and four-digit block.
Posted here for your copy-and-paste convenience.
$regex = '^[(]?[2-9]{1}[0-9]{2}[) -.]{0,2}' . '[0-9]{3}[- .]?' . '[0-9]{4}[
]?' . '((x|ext)[.]?[ ]?[0-9]{1,5})?$';
----
Manual Page -- http://www.php.net/manual/en/ref.regex.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56101
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56101&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56101&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56101&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56101&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56101&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56101&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56101&report=yes
Search -- http://master.php.net/manage/user-notes.php