, python , .replace java regex, , .replace.
, , , - org.apache.commons.lang3.StringUtils.replaceEach, , , , , .
long start = System.nanoTime();
for(int i=0; i< 1000000; i++) {
String name = "This String is Foo Bar";
name = StringUtils.replaceEach(name, matches, replaces);
}
System.out.println((System.nanoTime() - start)/1000000);
, cany , apache commons.
1/4 , .replace 1/2 , python.
python,