Tuesday, December 9, 2014

Extract only emails from string using Javascript

Today I'm going to show you how to extract only email from string. This can be done using javascript. Here sample code
function extractEmails(text) {
   return text.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
 } 

No comments:

Post a Comment

I Built a New Kind of Number Puzzle Game (And You Can Play It Free)

 For a long time, I wanted to play a mobile puzzle game that felt genuinely strategic—something that required real brainpower, skipped the a...