I am trying to know the pros and cons of using apache.commons.StringUtils.replacePattern()
instead of the java.lang.String.replaceAll()
function.
I heard that the replacePattern()
function improves the performance but I could not find that stated in any of the javaDocs or in any of the popular java forums. Please let me know if there are any other advantages of using the replacePattern()
method.