note 54064 added to function.ereg

From: Date: Wed, 22 Jun 2005 18:54:37 +0000
Subject: note 54064 added to function.ereg
Groups: php.notes 
Request: Send a blank email to php-notes+get-90802@lists.php.net to get a copy of this message
On a small note to email checking: Recently it is possible to register domains like www.küche.de This would also mean that the IsEMail() function from "php at easy2sync dot com" would report an email address like "contact@küche.de" as false. To correct this, use the function below: function IsEMail($e) { if(eregi("^[a-zA-Z0-9]+[_a-zA-Z0-9-]* (\.[_a-z0-9-]+)*@[a-zöäüÖÄÜ0-9]+ (-[a-zöäüÖÄÜ0-9]+)*(\.[a-zöäüÖÄÜ0-9-]+)* (\.[a-z]{2,4})$", $e)) { return TRUE; } return FALSE; } ---- Manual Page -- http://www.php.net/manual/en/function.ereg.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54064 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54064&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54064&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54064&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54064&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54064&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54064&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54064&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#90802) next »