I am fetching the file content like
$text = file_get_contents(' MY PAGE URL HERE ');
I want to extract the mail addresses in the page. I am using the below code spinet.
$res = preg_match_all("/[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}/i",$text,$matches);
Normally it is working fine. but getting an issue. If the page contain a mail id like suren.roy@gmail.com
then it is extracting only roy@gmail.com
. The text before the first .
is eliminated.