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

Matcher.appendReplacement() group syntax clarification

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.1
    • 1.4.0, 1.4.1
    • core-libs
    • None
    • hopper
    • x86, sparc
    • solaris_7, windows_2000
    • Verified

      Customer writes:

      The docs for appendReplacement() still do not describe how multiple digit
      group numbers are handled. Does $123 refer to group 123, or to group 12
      followed by the digit 3, or by group one followed by 23? I think I
      submitted a comment to this effect during public review.

      Its a minor issue, but does seem like something that ought to be nailed
      down.

      Last time I looked at the implementation, the backslash escape wan't
      specific to the dollar sign, and would escape any character it appeared
      in front of. This either needs to be documented, or fixed. Hopefully,
      you've just fixed the implementation.

            mmcclosksunw Michael Mccloskey (Inactive)
            mmcclosksunw Michael Mccloskey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: