Merge pull request #3512 from overleaf/jpa-cleanup-email-regex

[misc] EmailHelper: remove an unreachable group from the email regex

GitOrigin-RevId: 9b5f77e54cffd72220c0c2047032ba4ff0f9dece
This commit is contained in:
Miguel Serrano 2021-01-11 12:58:04 +01:00 committed by Copybot
parent 864a75c284
commit 32f133dd41

View file

@ -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)