Jump to content

preg_match_all question


neilfurry

Recommended Posts

:'( can you help me with this, i want to get emails from different webpages within the <a></a> tags, im using preg_match_all to do this, here is my code:

 

$res = preg_match_all(

    "/[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}/i",

    $text,

    $matches

  );

 

This gathers email but not those within the <a></a> tags.

 

Please help.

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/154379-preg_match_all-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.