EDIT: Sorry, misread this as a javascript question. The general stuff about regular expressions below still applies, but the syntax/method name will differ in java.
In regex, \d is shorthand for [0-9], and + means "match one or more instances of the previous character". So \d+ means "match any number of sequential digits".
You can group matches in a string by surrounding what you want with parenthesis, and each group is assigned a number, starting from 1 and incrementing for each group. You can replace with a matched group by putting $1 (or $2, etc...) in the replacement string.
Finally, replaceAll isn't a function. You use regular replace, but add a g at the end of the regex to signify "global replace".
So you are looking for something like this:
txt = txt.replace(/(\d+)([a-z])/g, "$1*$2")