DevToolbox

Regex Tester

Test a JavaScript regular expression against text. Every match is listed with its index and capture groups. Nothing leaves your browser.

/ /

Ready.

How the flags behave

This is the browser's own RegExp engine, so behaviour matches what your JavaScript will do in Chrome, Edge, Firefox and Safari.

What this regex tester does

Write a JavaScript regular expression, pick the flags you need and see every match against your test string as you type. Each row shows the match text, its start index and any capture groups.

The g flag finds all matches, i ignores case, m makes ^ and $ match per line, s lets dot cross newlines, u enables Unicode mode and y anchors at lastIndex. Invalid patterns are reported inline instead of throwing, so you can iterate quickly.

Matching stops after five thousand results to keep the tab responsive on pathological patterns. Everything runs locally in your browser; no expression or sample text is sent anywhere.