Web features explorer

String replaceAll()

Widely available since 2023-02-27
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.

Learning resources on MDN

Browser support

Specifications