Enter a pattern, tick the g, i, m, s, u, and y flags you need, paste your test text, and the matches light up in the panel below. Invalid patterns are flagged inline as you type, so you can fix a stray bracket or escape without leaving the page, and each match is broken out with its position, length, and capture groups.
Regex Tester Online
Regular expressions are easy to get subtly wrong, and a pattern that looks right can still miss the strings you care about. Type your pattern, tick the flags you need, and paste your sample text - every match lights up below as you type, so you confirm exactly what it catches before you paste it into code. Each match shows its start position, length, and capture-group contents, so seeing why a group came back empty takes one read. One-click starter patterns for email, URL, IPv4, phone, and date let you adapt a working expression instead of starting blank.
It is a read-only matcher: you supply the pattern and it shows live matches, rather than generating an expression for you or rewriting your text. Matching uses standard JavaScript regex syntax; your pattern and text never leave the browser tab.
Which flags to tick, and when
The six flag boxes change how the same pattern behaves, and the defaults are not always what you want:
| Flag | What it changes | Tick it when |
|---|---|---|
g global | Lists every match in the text instead of stopping at the first | You want to see all matches; untick it to just confirm the pattern matches at all |
i ignore case | Letters match regardless of case | cat should also catch Cat and CAT |
m multiline | ^ and $ anchor to the start and end of each line | The text has several lines and you anchor per line, not per block |
s dotall | . also matches across line breaks | A single . should cross newlines |
u unicode | Enables \p{...} property classes and astral characters | The pattern includes Unicode property escapes or emoji |
y sticky | Each match must begin exactly where the previous one ended | You match contiguous tokens from a fixed position |
Toggle any box and the highlight and the per-match breakdown refresh immediately, so the effect of a flag is visible without rerunning anything.
Where the regex tester fits in your workflow
A pattern rarely travels alone. Once it matches the way you want, paste two revisions of a config or log file into text diff to confirm only the lines you intended changed after a find-and-replace, or validate a JSON payload the pattern will run against in the JSON parser first. The developer tools hub collects the rest of the format, minify, and hash set, all running in-browser with no upload.
Frequently Asked Questions
What does Regex Tester Online do?
Test a regular expression against your own sample text and watch every match highlight as you type.
When should I reach for regex tester online?
Reach for it when a pattern is not catching what you expect and you want to confirm exactly which characters it matches before pasting it into code.
Are there starter patterns I can build from?
One-click starter patterns for email, URL, IPv4, phone, and date give you a working expression to adapt instead of beginning from a blank box.