Guest User

Untitled

a guest
Aug 23rd, 2018
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. get email ids from the given string using javascript
  2. (a) xxx@gmail.com (Blig fun), yyy@gmail.info (LOl)
  3.  
  4. I need the output like
  5.  
  6. xxx@gmail.com
  7. yyy@gmail.info
  8.  
  9. var tbstring = '(a) xxx@gmail.com (Blig fun), yyy@gmail.info (LOl)';
  10. result = tbstring.match(/b[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}b/ig);
  11. alert(result.join('n'));
Add Comment
Please, Sign In to add comment