replaceAll

text replaceAll(text, regex, replacement)

Replaces each substring in text that matches the regular expression with the given replacement.

Parameters

  1. text — text to be matched.
  2. regexregular expression to match against.
  3. replacement — optional replacement text, default is no replacement.

Returns