The replacement string/value to use when search is found
This can be a literal string like 'replace with this
, an empty string to remove the search value (''
), or a special regex value
See replacement here for more information: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace
Optional
testAn optional function to execute before running this search-and-replace that decides if it should run at all
The search value to test for
Can be a normal string (converted to a case-sensitive literal) or a valid regular expression as a string, or an actual RegExp object