Regular Expression Tester
Write a pattern, see every match highlighted live with capture groups and named groups. The fastest way to debug a regex before it ships.
How to use Regex Tester
- Enter your pattern and flags (g, i, m…).
- Type the test string — matches highlight instantly.
- Inspect each match’s groups in the list below.
The tester uses the browser’s native RegExp engine, so it supports every modern feature including lookbehind, named groups and unicode property escapes.
More tools on Dev Toolbox
FAQ
Why does my pattern error?
The message under the pattern is the browser’s own RegExp error — usually an unescaped bracket or a lookbehind in an older browser.
Does it support the g flag?
Yes — without g only the first match shows; with g every match is listed.
Can I test lookbehind?
Yes, in Chrome, Edge, Firefox 78+ and Safari 16.4+.
Go deeper: how regular expressions really work
Regular expressions look like keyboard noise until you know the pieces. This guide explains the building blocks, greedy vs lazy matching, and the patterns worth memorising — then you can test each one here.