Re: regex (preg_match) tld question

From: Date: Mon, 16 Oct 2000 04:38:08 +0000
Subject: Re: regex (preg_match) tld question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20297@lists.php.net to get a copy of this message
Hey Philip: > if (!preg_match('/^[_\.\'0-9a-z-]+@(\w+\.)+( ALL TLDS )$/',$value)) Three options off the top of my head: Place all TLD's in a string "com|org|net|us|ca|uk...etc..." Have TLD's in a db, which you do a lookup against in the next line Have TLD's in an array, which you do an inarray() against in the next line See you, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#20297) next »