String matchAll()Baseline · Widely available
The matchAll() method of strings matches a string against a regular expression and returns an iterator of all results, including capturing groups.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.
Browser support
DesktopChrome
1–72Not supported
73+Supportedsince Mar 12, 2019
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–66Not supported
67+Supportedsince May 21, 2019
Current: 157Safari
1–12.1Not supported
13+Supportedsince Sep 19, 2019
Current: 27MobileChrome Android
18–72Not supported
73+Supportedsince Mar 12, 2019
Current: 155Firefox Android
4–66Not supported
67+Supportedsince May 21, 2019
Current: 157Safari iOS
1–12.2Not supported
13+Supportedsince Sep 19, 2019
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: matchAll.
Feature detection
JS · check before using
if ("matchAll" in String || ("prototype" in String && "matchAll" in String.prototype)) {
// String.matchAll is available
}