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

Proposal for using .@.\..+ 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

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              ira.chui Ira Chui
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Subcomponents