HTML5 MP3 Player Radio KPlayer

Find Email From PHP String

On May 3, 2012, in LAMP, PHP, Web Application, by Sandeep Verma

Hits: 4487  

function lower($n)


return( strtolower(str_replace(” ““”$n)) );


$string "Hello Friends, I am Sandeep Verma. My Emails are, sandeepv, svnlab @ and svmbm@ Do you know we can use this code to get emails from a PHP String. Also code is converting emails to proper case like Sandeepv and are same. But contact me here";

preg_match_all("/[_a-z0-9-]+(\.[_a-z0-9-]+)*([ ]{0,2})@[a-z0-9- ]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})/i"$string$matches);

$lower array_map("lower"$matches[0]);

$result array_unique($lower);




Array ( [0] => [1] => [2] => [3] => [6] => )

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...