Q: What's the difference between the java.lang.String
methods replace()
and replaceAll()
, other than that the latter uses regex.
A: Just the regex. They both replace all :)
http://docs.oracle.com/javase/8/docs/api/java/lang/String.html
PS:
There's also a replaceFirst()
(which takes a regex)