replace(regexp, newSubstr) replace(regexp, replacerFunction) replace(substr, newSubstr) replace(substr, replacerFunction)