emails-regex
v1.1.0
Published
Email Regex Pattern
Downloads
21
Maintainers
Readme
emails-regex
Emails Regex Pattern returns a regex that matches Emails.
Use it for picking up Emails's from text.
Install
$ npm install emails-regex
Usage
const emailsRegex = require('emails-regex');
// Contains a emails
'Contact us at [email protected]'.match(emailsRegex());
// => ['[email protected]']
'The founding team members are [email protected] & [email protected]'.match(emailsRegex());
// => ['[email protected]', [email protected]]
//Doesn't contain emails
'Contact us at support@generic'.match(emailsRegex());
// => []
See Also
- sindresorhus/email-regex
- regexhq/regex-email
- You shouldn't use this for validating emails. Use it only for hinting to the user.