1. regex with variablespa
example: find the number and put a parenthese around the number.code
output: blog
a(5265)bit
String field = "a5265b"; String result = field.replaceAll("(\\d+)", "($1)");