I have input string as
input = "AAA10.50.30.20"
input.replaceAll("10.([01]?\\d\\d?|2[0-4]\\d|25[0-5]).([01]?\\d\\d?|2[0-4]\\d|25[0-5]).([01]?\\d\\d?|2[0-4]\\d|25[0-5])",
"X");
output is : "AAAX"
However i want the output as "AAAXXXXXXXXXXX"
It should replace the IP with multiple 'X' which are equivalent to number of characters in IP address