[thelist] Stripping characters from string

CDitty mail at redhotsweeps.com
Sun Apr 28 21:02:01 CDT 2002


Thanks.  This is it.  This works like a charm.

Thanks again.

Chris

At 11:54 AM 4/28/2002, you wrote:

>Are you just trying to grab the email addresses from the string?
>
>The following code should take the email address and put it into $store,
>which is an array containing all the matches [anything inbetween the
>parentheses]).
>
>
>$regex = "([A-Z0-9\.\-]+@[A-Z0-9\.\-]+\.[A-Z\.]+)";
>$string = "Chris Ditty <mail at redhotsweeps.com>";
>
>eregi($regex, $string, $store);
>
>
>Then you can use $store as you please.
>
>Theres more detail on ereg/eregi over at php.net
>(http://www.php.net/manual/en/function.ereg.php).
>
>Oh and use a better regex if you like, that was just one I had lying
>around :o)




More information about the thelist mailing list