Test regular expressions with real-time match highlighting and groups.
Test regular expressions against sample text with live match highlighting, capture-group inspection, and a running match count. Toggle the g, i, and m flags and watch matches update as you edit either the pattern or the text.
It uses your browser's native JavaScript regex engine, so behavior is exactly what you'll get in JavaScript code — and very close to most other languages for everyday patterns.
To pull dates out of a log line, test the pattern (\d{4})-(\d{2})-(\d{2}) against Deployed 2026-07-05, rollback ready since 2026-06-19 with the g flag on. Both dates highlight, the match count reads 2, and the group panel shows captures 1–3 as year, month, and day. Turn g off and only the first date matches — the most common "why is it only finding one?" answer.
g (global) finds all matches instead of stopping at the first. i (ignore case) makes letters match either case. m (multiline) changes ^ and $ to match at each line's start and end rather than only the whole string's.
By design, . matches any character except newlines. Use the s flag where supported, or the pattern [\s\S] to genuinely match anything including newlines.
Quantifiers are greedy by default — .* grabs as much as possible. Add a ? to make it lazy (.*?), or better, use a negated character class like [^"]* when matching up to a delimiter; it's faster and harder to get wrong.
The core syntax — character classes, quantifiers, groups, anchors, alternation — is portable. Differences appear at the edges: lookbehind support, named-group syntax, and flag spellings vary slightly between engines.