Java Regex Arguments

So if I wished to replace all numbers with a given value, I could just use

"hello8".replaceAll("[1-9]", "!");

hello!

Now is there a way to get the number that is actually being matched and add that to the string?

e.g.

hello!8

5
задан sudo bangbang 13 June 2016 в 08:22
поделиться