Web platform 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

Surveys

Usage (according to Chrome Platform Status)

~27.333% of page loads. More data at chromestatus.