[EMAIL PROTECTED] wrote:
> I want to have the python equivalent function of this
> (that checks email format)
> 
> function CheckEmail($Email = "") {
>   if (ereg("[[:alnum:[EMAIL PROTECTED]:alnum:]]+\.[[:alnum:]]+",
> $Email)) {
>     return true;
>   } else {
>     return false;
>   }
> }

While it is possible to translate the above code into Python (see 
http://docs.python.org/lib/module-re.html), you should know that the 
regex above will not validate all possible email addresses.  In general 
it is a fools errand to try to anyway.
--
Benji York


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to