Skip to main content

Browser support

Support matrix

EnvironmentSupportNotes
Chrome / Edge 112+✅ FullNative RegExp.escape() available
Firefox 134+✅ FullNative RegExp.escape() available
Safari 18.4+✅ FullNative RegExp.escape() available
Older evergreen browsers✅ FullFalls back to escape-string-regexp automatically
Node.js 18+✅ FullRequired for escape-string-regexp v5 (ESM)
Node.js < 18escape-string-regexp v5 is ESM-only
SSR (Next.js, Remix)✅ FullPipeline has no window/document reads
React Native⚠️ UntestedNo known blockers; contributions welcome
IE 11Not supported; library is ESM-only

Notes

RegExp.escape() detection is runtime — no build-time polyfill or configuration needed. When native RegExp.escape is absent, escape-string-regexp is used automatically.

Case-insensitive matching uses String.prototype.toLowerCase() (not the locale variant). This is intentional: locale-dependent matching produces different results across server and client environments, breaking SSR hydration.

SSR — the entire matching pipeline (findMatches, combineChunks, applyStates, buildSegments) contains no window, document, localStorage, or other browser-only globals. Keys derive from ${start}-${end}-${matchIndex} and are stable across server and client renders.