note 68099 added to function.preg-match
| From: | pnomolos---gmail---com at osu1 dot php dot net | Date: | Thu, 13 Jul 2006 08:36:36 +0000 |
| Subject: | note 68099 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-114724@lists.php.net to get a copy of this message | ||
A note to lcvalentine and najeli ... to make things much easier, you can include 'x' in
the regular expression modifiers which makes whitespace outside of character classes mean nothing
(meaning you don't have to remove breaks), as well as allowing you to comment the regular
expression... like so!
preg_match( "/^
[\d\w\/+!=#|$?%{^&}*`'~-] # Wow that's ugly looking
[\d\w\/\.+!=#|$?%{^&}*`'~-]*@ # So's that one
[A-Z0-9]
[A-Z0-9.-]{0,61}
[A-Z0-9]\. # Letters or numbers, then a dot
[A-Z]{2,6}$/ix", 'user@subdom.dom.tld'
);
----
Server IP: 66.207.199.35
Probable Submitter: 70.67.87.59
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.preg-match.php
Edit -- http://master.php.net/note/edit/68099
Del: integrated -- http://master.php.net/note/delete/68099/integrated
Del: useless -- http://master.php.net/note/delete/68099/useless
Del: bad code -- http://master.php.net/note/delete/68099/bad+code
Del: spam -- http://master.php.net/note/delete/68099/spam
Del: non-english -- http://master.php.net/note/delete/68099/non-english
Del: in docs -- http://master.php.net/note/delete/68099/in+docs
Del: other reasons-- http://master.php.net/note/delete/68099
Reject -- http://master.php.net/note/reject/68099
Search -- http://master.php.net/manage/user-notes.php