Need help with Preg_Match

3 replies
I use this to get emails off of a web page, but some school emails have a / . I don't understand preg_match well enough to add a / to acceptable charters. Even after looking at examples online I had trouble with it.


Code:
$var = preg_match_all(
"/[a-z0-9]+[_a-z0-9.-]*[a-z0-9]+@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})/i",$body,$matches);

Thanks for your help,

Rick
#pregmatch

Trending Topics