Merge pull request #2303 from overleaf/ta-email-regex-fix

Fix Email Parser Regex

GitOrigin-RevId: 7d7deb18473075107bbb1dcc615bfb1acbb5b23b
This commit is contained in:
Alasdair Smith
2019-10-31 12:01:43 +00:00
committed by sharelatex
parent 365bd08425
commit 7737fe7b71
@@ -1,5 +1,5 @@
// eslint-disable-next-line no-useless-escape
const EMAIL_REGEXP = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\ ".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA -Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
const EMAIL_REGEXP = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\ ".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
function getDomain(email) {
email = parseEmail(email)