Advertisement spaceHeader Banner
Tip: Toggle to Replace mode to test substitutions with $1, $2 group references before using the pattern in your code.
/ /
Match Status
0Matches Found
0Groups Captured
0 msExecution Time

About this tool

Regex Tester Guide

How to Actually Read Your Regex Results

What this tester actually does under the hood, with a worked example for each feature, plus answers to the questions we get asked most.

Quick answer: This tool runs your pattern against your test string live in the browser using JavaScript's native regex engine, highlights every match inline, and breaks each match down into its captured groups — so you can see exactly what your pattern caught instead of just whether it matched.

Live Highlighting, Not Just a Pass/Fail Result

Most simple regex checkers only tell you whether a pattern matched somewhere in the text — they don't show you where.

This tester overlays your test string with a transparent highlight layer, so every match is marked directly inside the text as you type, using the pattern [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} against a block of text containing three email addresses highlights all three at once, updating on every keystroke in the pattern or the text box.

Match Breakdown With Captured Groups

Every match is also listed separately below the text area, showing its index position in the string and, if your pattern has parentheses, the individual captured groups.

A pattern like ([a-zA-Z0-9._%+-]+)@([a-zA-Z0-9.-]+\.[a-zA-Z]{2,}) against admin@toolmato.org produces:

Match 1 at index 0: admin@toolmato.org Groups: G1="admin", G2="toolmato.org"

That makes it easy to confirm your groups are capturing the right pieces before you copy the pattern into your own code.

Find & Replace Mode

Switching to Replace mode lets you test a substitution string alongside your pattern, including group references like $1 and $2, and shows the resulting output live.

With the pattern above and a replacement of $1 (at) $2, the text Contact admin@toolmato.org for help becomes:

Contact admin (at) toolmato.org for help

This is useful for confirming a masking or reformatting pattern behaves correctly before wiring it into real code.

Common Pattern Presets

A built-in dropdown fills in ready-made patterns for frequent use cases — email, URL, US phone number, IPv4 address, YYYY-MM-DD date, hex color code, and basic username validation — so you don't have to write or remember them from scratch.

Selecting the "IPv4 address" preset instantly loads \b(?:\d{1,3}\.){3}\d{1,3}\b into the pattern field and re-runs it against whatever text is already in the box.

Catastrophic Backtracking Warning

Before running your pattern, the tool checks it for common shapes known to cause catastrophic backtracking — nested quantifiers like (a+)+ or (a*)* — and flags a warning if it finds one.

Typing a pattern like (a+)+$ shows a warning that the pattern may cause severe slowdowns on certain inputs, before it has a chance to freeze your browser tab on a long test string — a check most free online regex testers skip entirely.

See Every Match Inline

Matches are highlighted directly inside your test string, not just reported as a count.

Groups, Not Just Matches

Each match lists its captured groups individually, so you can confirm your pattern extracts the right pieces.

Flags Risky Patterns

Nested-quantifier patterns that can freeze a browser tab are surfaced as a warning before you run them.

Frequently Asked Questions

It uses JavaScript's native RegExp engine, the same one that runs in every browser and in Node.js. Patterns you test here will behave identically when used in JavaScript code, but syntax specific to other languages, like Python's named groups written as (?P<name>...), may need adjusting for JS's (?<name>...) syntax.

g (global) finds every match in the text instead of stopping at the first one. i (ignore case) makes matching case-insensitive. m (multiline) makes ^ and $ match the start and end of each line rather than only the start and end of the whole string. s (dot-all) makes . also match newline characters, which it otherwise doesn't.

Without the g flag, JavaScript's regex engine only finds the first match in the string by design, so the tester only highlights and lists that one match. Turn on the Global flag if you want every occurrence found and listed.

Some patterns, especially ones with nested repeating groups like (a+)+, can cause the regex engine to try an exponentially growing number of combinations on certain non-matching input, freezing the page. This tester scans your pattern for that shape and shows a warning so you can simplify it before it causes a slowdown.

No. Matching, highlighting, and replacing all run entirely in your browser using JavaScript, nothing you type here is sent to or stored on our servers, so it's safe to test patterns against real emails, logs, or other sensitive text.
Advertisement spaceTool Page Inline
Rate this tool
0.0
0 ratings
5 stars: 0 4 stars: 0 3 stars: 0 2 stars: 0 1 star: 0
Click to rate this tool
Share this tool