I've looked in the Java API and some common 3rd party libraries but I'm unable to find a suitable method that will do what String.replaceAll does, except for StringBuilder.
I know that with a little work, it can be done for StringBuffer, but I don't want to go down this road because StringBuffer is slower.
Does anyone know of any 3rd party utilies, or if there is a quick piece of code to implement this functionality?
Matcher(which can be created on anyCharSequence) and then write a loop withappendReplacementandappendTailto write your ownreplaceAll.append*magic...Matcherprovides its ownreplaceAll.append*functions take a StringBuffer as well... fair enough.