for the above pattern .*? was not captured. Thus, disappeared.
You should wrap it with brackets as (.*?)
Because you have one more captured group, you should offset originals by 1
from $1-11-$3 to $1$2-11-$4
PS: you should only name constant (final variable with CAPITAL cases)
Check out the Javadoc page of java.util.regex.Pattern for what it means. As for when to use it, when you need to match any number of characters but you don't want it to take up more than it should. For instance, if you have a regex of ".*(\\d-)+\\d", and an input of "abc1-2-3", the ".*" will not match "abc" as you may expect but "abc1-", leaving only "2-3" for the second part. If you use ".*?(\\d-)+\\d", the ".*?" will not steal the "1-" away and only match "abc", leaving "1-2-3" for the second part.