⚡ Curated dev resources & dealsSponsored
DevToolBayFree Developer Tools

Regex Tester

Test regular expressions against sample text with live match highlighting, capture-group tables and match counters. Flags toggle instantly. Errors explain what broke.

g global
i ignore case
m multi-line
s dotAll
u unicode
y sticky
Matches appear here…

Notes

Highlighting wraps each match in <mark>; overlapping zero-width matches are shown safely. The capture table lists named and numbered groups for every match (empty groups render as ∅). JavaScript regex flavour applies — lookbehind, lookahead, backreferences and named groups all work; catastrophic patterns can lock a tab just like in Node, so mind nested quantifiers on long inputs.

How to use Regex Tester

Enter your pattern, set flags from the chips, and paste sample text below — matches highlight live in the preview with each capture group listed underneath. Global and multiline flags change the result set, and the group panel shows named groups by label, which makes debugging them far quicker than console logging.

Watch the catastrophic backtracking tell: if a pattern with nested quantifiers slows down as more text accumulates, restructure it with atomic groups or possessive-style alternation. Anchors (^, $) interact with the multiline flag, and the tester makes that interaction visible immediately.

Frequently asked questions

Which regex flavor does the tester use?

The JavaScript (ECMAScript) RegExp flavor with optional g, i, m, s and u flags — matching what runs in browsers and Node by default.

How do capture groups show up?

Each match and numbered capture group is highlighted and listed beneath the test text, so you can confirm the pattern extracts exactly the substrings you plan to use.

How do I test lookahead assertions?

Type them as usual: (?=...) for positive or (?!...) for negative lookahead. Zero-width matches are visualized so you see where assertions pass without consuming input.

Is my pattern or text uploaded?

No. Matching runs entirely in the browser, so patterns referencing internal code, endpoints or company names never leave your device.

Related tools