04 / Forge / Developer / Client-side
Regex tester
Test a JavaScript regular expression against sample text with flags, match list, and capture groups. Runs entirely in your browser; nothing you enter leaves the page.
What this regex tester does
Type a pattern and sample text and the tool lists every match as you type, with the index of each match and the contents of its capture groups. Flags for global, case-insensitive, multiline, dot-all, and unicode are toggles, so you can see how each one changes the result.
Because it uses the browser's JavaScript engine, what matches here is exactly what will match in Node.js or in a browser script. Patterns for Python, PCRE, or Go can differ in lookbehind support and named-group syntax.
Reading the output
Each match shows its full text and its position. Numbered groups appear in order; named groups appear by name. An empty match list with no error means the pattern is valid but matches nothing in the sample, which is usually a flag problem: forgetting the global flag stops after the first match, and forgetting case-insensitive misses capitalised text.
Questions
Which regex flavour does this use?
JavaScript, as implemented by your browser. It supports lookahead, lookbehind, named groups, and unicode property escapes in current browsers.
Why does my pattern only find one match?
Enable the global flag. Without it, a JavaScript regular expression stops at the first match.
Is my text sent anywhere?
No. Pattern and sample stay in the page.
Have a project in mind?