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

lack of translation(Japanese) java/util/regex/Matcher.html#appendReplacement

XMLWordPrintable

      It appears that three sentences have been lost in Japanese API doc.

      ---------------
      public Matcher appendReplacement(StringBuffer sb,
                                       String replacement)

       Implements a non-terminal append-and-replace step.

       This method performs the following actions:

         1. It reads characters from the input sequence, starting at the append
            position, and appends them to the given string buffer. It stops after
            reading the last character preceding the previous match, that is, the
            character at index start() - 1.

         2. It appends the given replacement string to the string buffer.

         3. It sets the append position of this matcher to the index of the last
            character matched, plus one, that is, to end().

       The replacement string may contain references to subsequences captured
       during the previous match: Each occurrence of $g will be replaced by the
       result of evaluating group(g).

      <Lost> The first number after the $ is always treated as part of the group
      <Lost> reference. Subsequent numbers are incorporated into g if they would
      <Lost> form a legal group reference. Only the numerals '0' through '9' are
      <Lost> considered as potential components of the group reference.

       If the second group matched the string "foo", for example, then passing the
       replacement string "$2bar" would cause "foobar" to be appended to the string
       buffer. A dollar sign ($) may be included as a literal in the replacement
       string by preceding it with a backslash (\$).

            duke J. Duke
            peytoia Yuka Kamiya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: