Regex Tester
Test a regular expression against your text and highlight every match — live, in your browser.
Regular expressions are powerful but fiddly, and the fastest way to get one right is to test it against real text. Regex Tester runs your pattern live against your input and lists every match as you type, so you can build and debug a regex in your browser.
How to use regex tester
- 1. Enter your regular expression and flags.
- 2. Paste the text to test it against.
- 3. See the match count and each match, updated live.
When to use Regex Tester
Build a pattern
Craft a regex step by step, watching the matches update as you refine it.
Debug a failing regex
See exactly what your pattern matches (or misses) in real text.
Learn regex
Experiment with patterns and flags to understand how they behave.
Flags
The g flag is always on, so every match is found, not just the first. Add i for case-insensitive, m so ^ and $ match at each line, s so . also matches line breaks, and u for full Unicode. With u you can use \p{L} for "any letter", which matches ă, ș or é as well as a–z — the \w shortcut only covers English letters, digits and _.
Patterns that freeze the page
Some patterns take exponentially long on text that almost matches — nested repeats like (a+)+ or (.*)* are the classic case. If the tab stops responding while you type, that's what happened: simplify the nested part. The same pattern would cause the same slowdown in your code, so it's worth fixing here.
Frequently asked questions
Which regex flavour does it use?
JavaScript's regular expression engine, since it runs in your browser — with the usual flags like global and case-insensitive.
Does it show all matches?
It counts every match and lists the first 200 below the text, updating as you type. An empty match is shown as ∅.
Is my text uploaded?
No — the pattern runs entirely in your browser.
