Find Email From PHP String

Hits: 5799  

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] => )

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch

2 thoughts on “Find Email From PHP String”

  1. Pingback: GVK Biosciences
  2. Pingback: Bdsm

Leave a Reply

Your email address will not be published.