Uploaded image for project: 'Syncope'
  1. Syncope
  2. SYNCOPE-348

Email address validator regexp

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0.6, 1.0.7, 1.1.0
    • 1.0.8, 1.1.0
    • None
    • None

    Description

      Improve email validator regular expression from

      private static final Pattern EMAIL_PATTERN = Pattern.compile("^\\w\\-(\\.\\w)\\w@(\\w\\-
      .)
      [A-Z]

      {2,4}

      $", Pattern.CASE_INSENSITIVE);

      to

      private static final Pattern EMAIL_PATTERN = Pattern.compile("[a-z0-9!#$%&'*+/=?_`

      {|}~-](?:
      .[a-z0-9!#$%&'*
      /=?^_`{|}

      ~-])@(?:[a-z0-9](?:[a-z0-9-][a-z0-9])?
      .)
      [a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", Pattern.CASE_INSENSITIVE);

      Riccardo

      http://syncope-dev.1063484.n5.nabble.com/Email-address-validator-td5713393.html

      Attachments

        Activity

          People

            ilgrosso Francesco Chicchiriccò
            rcosta Riccardo Costa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: