Web features explorer

String replaceAll()

Widely available
Tags: javascript Groups: JavaScript > Primitive types > Strings

The replaceAll() method of strings returns a new string where all matches of a pattern (a string or regular expression) have been substituted with a replacement string. To learn more, see String.prototype.replaceAll() at MDN.

Compatibility

Specifications