I would like to replace some texts in StringBuilder. How to do this?
In this code I got java.lang.StringIndexOutOfBoundsException at line with mat
java.lang.StringIndexOutOfBoundsException
mat
I've solved this by adding matcher.reset():
matcher.reset()
while (matcher.find()) { sb.replace(matcher.start(), matcher.end(), "x"); matcher.reset(); }