Mailinglisten-Archive |
Hallo,
ich habe ein Problem mit einer Mail-Validierungsfunktion.
Sie funktioniert soweit, allerdings hat sie Probleme mit
Sub-Domains.
Wenn eine Adresse mit dem Schema
irgendwer at sub-domain.thyssen.krupp.com
oder
irgendwar at sub-domain.hauptdomain.de
kommt, liefert mir die Funktion ein false zurück.
Kann mir evt. jemand helfen, wie ich die Funktion erweitere?
function isValidMail($email){
return preg_match
("/^[0-9a-z]([-_.]?[0-9a-z])*@[a-z0-9-]+.([a-z]{2}|
aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|shop)$/i",$email);
}
(umbruch wg.Mail)
Gruß
Thomas
--
Thomas Gigold - "No .com, Just Web!"
< http://gigold.de/ > _ < mailto:mail at gigold.de >
< http://www.bloghaus.net/ > - Deutsche Weblog Resource
php::bar PHP Wiki - Listenarchive