Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-30849

Proposal for using [email protected]\..+ as the best replacement for regular expression as opposed to the Regex Pattern

Details

    Description

      Due to potential performance issues, it would be more simple to use

      .@.\..+

      or when escaped for a Java String literal:

      .@.
      ..+

      instead of the the complex Regex Pattern of

      Pattern.compile("[
      w!#$%&'*+/=?^_`

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

      ~-])@(?:\\w(?:\\w-\\w)?
      .)
      \\w(?:\\w-*\\w)?");

      when compiling patches/hotfixes.

      Attachments

        Activity

          People

            david.truong David Truong
            ira.chui Ira Chui (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Packages

                Version Package
                5.2.X EE
                6.0.X EE
                6.1.30 EE GA3