Capture Groups
Groups are colour-coded by index: group 1 is blue, group 2 green, group 3 orange, group 4 pink. Full matches with no groups are highlighted in yellow.
tool / text
Live regex matching with coloured capture groups, match positions, and one-click patterns for common formats. Zero network requests.
← Back to toolsGroups are colour-coded by index: group 1 is blue, group 2 green, group 3 orange, group 4 pink. Full matches with no groups are highlighted in yellow.
g — find all matches, not just the firsti — case-insensitive matchingm — ^ and $ match line boundariess — dot matches newlines (dotall mode)u — full Unicode supportRegex fails quietly. A pattern that works on your three test strings misses the fourth format in production — or worse, backtracks catastrophically and pins a CPU. This tester runs your pattern live as you type and cuts off any run that exceeds 400 ms, flagging it as possible catastrophic backtracking. Better to find that out here than in an incident channel.
(\w+)@([\w.]+) visibly splits an address into user and domain.JavaScript's, exactly as your browser implements it. Patterns behave the same as they will in Node or frontend code. PCRE-only syntax like possessive quantifiers won't work here — and wouldn't work in your JS either.
No. Matching runs entirely in your browser with zero network requests, so you can paste logs or customer data without worrying about it.
Runs longer than 400 ms are stopped and flagged. Nested quantifiers like (a+)+ are the usual culprit — rewrite the pattern to remove the ambiguity.
Groups five and up reuse the fourth colour in the highlight view, but the match list below still labels every group by its number.
// huntermussel
HunterMussel builds intelligent automation workflows that extract, validate, and route structured data from unstructured sources — using AI agents and rule engines.
Explore Intelligent Automation →Advertisement · Publicidade