public String replaceAll ( String replacement ) { reset ( ) ; StringBuffer buffer = new StringBuffer ( input . length ( ) ) ; while ( find ( ) ) { appendReplacement ( buffer , replacement ) ; } return appendTail ( buffer ) . toString ( ) ; }
Replaces every subsequence of the input sequence that matches the pattern with the given replacement string .