Searches for a string specified by the
search parameter, and replaces it with the string specified by the
replaceWith parameter. The search string can be a literal, a regular expression, or a combination of both. Since the string can contain regular expressions, use a backslash to escape special characters. Special characters are
searchThe string to find and replace.
replaceWithThe replacement string.
ReturnsThe number of occurences that were found and replaced.