Code-Samples/javascript/40.3_regexp_code.html replace() function search for the given string and replace string and returns new replaced string.