Java regex replace group. But how can I use $1 followed by number.

Java regex replace group. replace method and back references of regex groups.