AW: [PHP] Regex

From: Date: Mon, 22 Apr 2002 20:24:40 +0000
Subject: AW: [PHP] Regex
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94052@lists.php.net to get a copy of this message
([[-a-zA-Z0-0_]*)\.([a-zA-Z]{2,4}$ should fit ur needs :P -----Ursprungliche Nachricht----- Von: James Taylor [mailto:jtx@nestllc.com] Gesendet: Montag, 22. April 2002 10:17 PM An: php-general@lists.php.net Betreff: [PHP] Regex I'm trying to come up with a regular expression that will match the TL and Second Level domain names in someone's email address ONLY. So, say someone's address is "joe@relay.mail.someserver.pacbell.net", I need to match ONLY pacbell.net. It shouldn't matter what the address looks like, I'm looking for any number of digits, a dot, any number of digits, and the end of the line. The closest thing I can come up with is /\@.+?(.+\..+)?$/, but, as you can guess, that matches everything except the very first character. Can anyone help me with this? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#94052) next »