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

To add a metachar \R for line ending and character classes for vertical/horizontal ws \v \V \h \H

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 8
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b40
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      (1) The second strong recommendation in tr18 is from its section
      1.6 Line Boundaries, where it reads:

          It is strongly recommended that there be a regular expression
          meta-character, such as "\R", for matching all line ending
          characters and sequences listed above (e.g. in #1). It would
          thus be shorthand for:

          ( \u000D\u000A | [\u000A\u000B\u000C\u000D\u0085\u2028\u2029] )

      (2) Perl has 4 predefined character classes \h \H \v \V for vertical and horizontal whitespace.

      \h matches any character considered horizontal whitespace; this includes the space and tab characters and several others listed in the table below.
      \H matches any character not considered horizontal whitespace.
      \v matches any character considered vertical whitespace; this includes the carriage return and line feed characters (newline) plus several other characters, all listed in the table below.
      \V matches any character not considered vertical whitespace.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sherman Xueming Shen
              Reporter:
              sherman Xueming Shen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: