What is your input? On Sat, Jan 26, 2013 at 11:29 PM, Tedd Sperling <tedd@xxxxxxxxxxxx> wrote: > > On Jan 26, 2013, at 12:20 PM, Daniel Brown <danbrown@xxxxxxx> wrote: > > > > It's imperfect, but will work for the majority of emails: > > > > <?php > > function scrape_emails($input) { > > > preg_match_all("/\b([a-z0-9%\._\+\-]+@[a-z0-9-\.]+\.[a-z]{2,6})\b/Ui",$input,$matches); > > return $matches; > > } > > ?> > > It works imperfectly enough for me. :-) > > Here's the result: > > http://www.webbytedd.com/aa/strip-email/index.php > > Thanks to all. > > Cheers, > > tedd > > PS: Yes, 'extract" is what I meant and more correct than 'strip' as I said. > > _____________________ > tedd@xxxxxxxxxxxx > http://sperling.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Shiplu.Mokadd.im ImgSign.com | A dynamic signature machine Innovation distinguishes between follower and leader