Hello Everyone,

Does anyone have an regular expression or other way to extract an email
address out of a string.

I have been using:

        if (ereg ("^" .
                        "[a-z0-9]+([_\\.-][a-z0-9]+)*" .        //user
                        "@" .
                        "([a-z0-9]+([\.-][a-z0-9]+)*)+" .   //domain
                "\\.[a-z]{2,}" .                    //sld, tld 
                        "$" , $body[$line], $regs))

It will match an email address by itself for example;

What it won't do is extract [EMAIL PROTECTED] from; <a
href="mailto:jr@;johnrudnick.com">[EMAIL PROTECTED]</a>.

Any help would be appreciated.

Thanks in Advance!



SallyJo, Inc., offers Top Notch Dedicated & Virtual Hosting.
Visit: http://www.SallyJoInc.com


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to