Optionaltext: stringOptionalpattern: stringOptionalflags: stringOptionalreplaceWith: stringOptionaltextThe text to make the replacements in.
OptionalpatternThe regular expression, written as it would be between the slashes in JavaScript, such as
[0-9]+.
OptionalflagsThe regular expression flags: g replaces every match instead of the first, i ignores
case, and m, s, u, y work as in JavaScript.
OptionalreplaceThe text that takes the place of each match; $1 and the like refer to capture groups,
as in JavaScript.
A text, a regular expression and a replacement for
text.regexReplace.