Extract email addresses from text string – PHP Script!

We some time  need to extract the email address from a long string or text paragraphs. Lets say we have a long paragraph which is about 3 pages of text and need to get the email addresses in between from the paragraph, it will at least take half an hour to extract all the email address manually.

But with the help of PHP it will only take seconds to extract all of them at one, whether it is few pages or hundreds of pages.

This small PHP script will help us to extract the email address from a long paragraph or text. Just copy paste this script and save it as a PHP file (extract.php):

The above script will produce this result:

 

Related Posts

7 thoughts on “Extract email addresses from text string – PHP Script!

Leave a Reply