Skip to content

Instantly share code, notes, and snippets.

@seanbehan
Last active October 3, 2022 07:49
Show Gist options
  • Save seanbehan/be4d9dd7b31ca0d9ad12 to your computer and use it in GitHub Desktop.
Save seanbehan/be4d9dd7b31ca0d9ad12 to your computer and use it in GitHub Desktop.
extract email addresses from string with javascript
// http://rubular.com/r/twBPG8HQgP
regex = /\S+[a-z0-9]@[a-z0-9\.]+/img
"hello sean@example.com how are you? do you know bob@example.com?".match(regex)
// ["sean@example.com", "bob@example.com"]
@gajus
Copy link

gajus commented May 7, 2020

@itashdv
Copy link

itashdv commented Aug 27, 2020

It is working like a charm, thank you very much!

@VirajAgarwal1
Copy link

Thank You works like a charm even now...

@abenmbarek
Copy link

You've saved my day ! thanks a lot !

@sonali1234-stack
Copy link

Hi, Can you please help me with Google app script for scrapping email address from website URL in Google Sheets.

This code is not working in my sheet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment