Regex tutorial, Matcher.appendTail() in the code example doesn't do anything · Issue #278 · java/devjava-content
Repository navigation
Regex tutorial, Matcher.appendTail() in the code example doesn't do anything #278
New issue
New issue
Open
Open
Regex tutorial, Matcher.appendTail() in the code example doesn't do anything #278
Description
@authentictech's profile authentictech opened on Sep 11, 2026In the Tutorials > Regular Expressions > The Matcher Class page, Using AppendReplacement and AppendTail section, the method call m.appendTail(sb) is included in the code example to demonstrate this method's functionality.
However, it makes no difference to the output which is still "-foo-foo-foo-" even when removing m.appendTail(sb).
Is this line always included for a reason? If so, I suggest adding an explanation. Otherwise, updating the code example to modify the output, or adding a new code section specifically for this method would be helpful, I think, to show what it does.
Thanks.