note 90783 added to function.preg-match

From: Date: Sat, 09 May 2009 17:17:35 +0000
Subject: note 90783 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-154391@lists.php.net to get a copy of this message
FILTER_VALIDATE_EMAIL is very poor at validating email addresses. Misses all sorts of things. This RegEx is much much better. http://SimonSlick.com/VEAF/ For example it fails the following plus a whole lot more: ""@domain.tld is valid (empty double quoted local part is RFC compliant) local-part@tld is valid (tld only domain is RFC compliant) local-part@domain-label-longer-than-63-octets.tld is not valid (RFC restricts domain labels to 63 octets each) local-part@domain.tld- is not valid (domain labels can not end with hyphen) local-part@[address-literal] "local\"part"@domain.tld is valid ---- Server IP: 209.41.74.194 Probable Submitter: 71.117.194.253 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match.php Edit -- https://master.php.net/note/edit/90783 Del: integrated -- https://master.php.net/note/delete/90783/integrated Del: useless -- https://master.php.net/note/delete/90783/useless Del: bad code -- https://master.php.net/note/delete/90783/bad+code Del: spam -- https://master.php.net/note/delete/90783/spam Del: non-english -- https://master.php.net/note/delete/90783/non-english Del: in docs -- https://master.php.net/note/delete/90783/in+docs Del: other reasons-- https://master.php.net/note/delete/90783 Reject -- https://master.php.net/note/reject/90783 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#154391) next »