reg exp help

From: Date: Mon, 23 Jul 2001 04:00:02 +0000
Subject: reg exp help
Groups: php.general 
Request: Send a blank email to php-general+get-59122@lists.php.net to get a copy of this message
hi all, two quick reg exp problems: one: $username must only contain a-z lowercase, 0-9, no spaces, no other characters. what would the regexp be? if(ereg("????????????????", $username)) { $valid = "yes" } else { $valid = "no") two: i want to do a really small email validation, just to make sure the email probably right, as in: anything@anything.anything what's the best reg exp to use. i'm aware there are email validating script out there, but I want to learn for myself many thanks in advance justin french

« previous php.general (#59122) next »