Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8305205

Emoji related binary properties in RegEx

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 21
    • core-libs
    • None
    • source
    • minimal
    • These are new constructs, so there should be no backward compatibility risk.
    • Java API
    • SE

      Summary

      Support Emoji-related binary properties in java.util.regex.Pattern.

      Problem

      Emoji-related properties are introduced in java.lang.Character class, such as Character.isEmoji(int codePoint). However, these properties cannot directly be used within regular expression constructs.

      Solution

      Introduce 6 new binary properties Emoji, Emoji_Presentation, Emoji_Modifier, Emoji_Modifier_Base, Emoji_Component and Extended_Pictographic in java.util.regex.Pattern class, and they should be constructed with the notation \p{IsXXXX}.

      Specification

      Append the following 6 new binary properties in the list below binary properties in java.util.regex.Pattern class description:

      @@ -636,10 +636,16 @@
         *   <li> Digit
         *   <li> Hex_Digit
         *   <li> Join_Control
         *   <li> Noncharacter_Code_Point
         *   <li> Assigned
      +  *   <li> Emoji
      +  *   <li> Emoji_Presentation
      +  *   <li> Emoji_Modifier
      +  *   <li> Emoji_Modifier_Base
      +  *   <li> Emoji_Component
      +  *   <li> Extended_Pictographic
         * </ul>
         * <p>
         * The following <b>Predefined Character classes</b> and <b>POSIX character classes</b>
         * are in conformance with the recommendation of <i>Annex C: Compatibility Properties</i>
         * of <a href="http://www.unicode.org/reports/tr18/"><i>Unicode Technical Standard #18:

            naoto Naoto Sato
            naoto Naoto Sato
            Iris Clark, Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: