-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Closed
Labels
Description
Documentation
The documentation for Match.expand() does not specify that you can use a named backreference to group 0 (\g<0>) to reference the entire matching string.
Note that unlike Match.group(), a numeric backreference to group 0 (\0) will not be replaced. This inconsistent behavior has lead to some confusion.