fix bug: replaceAll should have a RegExp argument