Java-Rearranging Captured Group

Rearranging Captured Group The appendReplacement() method has special provision for recognizing references to capturing groups in the replacement text string. If $n, where n is an integer, appears in the replacement string, it is interpreted as the text corresponding to group n. You can therefore replace the text matched to a complete pattern by any … Read more…