1.1.0 • Published 6 years ago
emails-regex v1.1.0
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 support@generic.com'.match(emailsRegex());
// => ['support@generic.com']
'The founding team members are ravi@abc.in & kishan@abc.in'.match(emailsRegex());
// => ['ravi@abc.com', kishan@abc.com]
//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.