Test a regular expression against sample text and see every match, its position and its capture groups. The tester uses your browser’s JavaScript RegExp engine, so results match what your JavaScript or TypeScript code will do.
How to use
- Type a pattern without the surrounding slashes, for example
(\w+)@(\w+)\.com. - Set flags:
g(all matches),i(ignore case),m(multiline),s(dot matches newlines),u(Unicode). - Paste your test string.
- The match list updates as you type: each match shows the matched text, its index and any captured groups. Invalid patterns show the browser’s error message.
Tips
- Without the
gflag, only the first match is listed. - Other engines (PCRE, Python
re, Java) differ in some features, such as lookbehind support and named-group syntax, so re-test there if your code is not JavaScript. - Keep samples small when testing patterns with nested quantifiers, which can backtrack heavily.
Related
Text diff checker · Cron expression generator · JSON formatter
How we check
Checked against the tool’s unit tests and a manual run in a desktop browser on 2026-11-13 (Asia/Colombo). Corrections: [email protected].