Regex Tester & Debugger
Live match highlighting, visual token explainer, replace mode, 25+ pattern library, ReDoS detector, and one-click export — the regex workbench built for speed.
$1,
$2 for capture group back-references.
$& = entire match.
$` = before match.
$' = after match.
| # | Match | Position | Length |
|---|---|---|---|
| No matches yet — enter a pattern and test string. | |||
| # | Full Match |
|---|---|
| No capture groups found in your pattern. | |
| # | Match | Start | End | Line | Column |
|---|---|---|---|---|---|
| No matches yet. | |||||
Run a match to see summary statistics.
Common questions
This tool uses JavaScript regex (ECMA-262) — the same engine used in Node.js, Chrome, Firefox, and most modern browsers. It supports all standard features including lookaheads, lookbehinds, named capture groups, and unicode property escapes with the u flag.
No. All regex matching, highlighting, and replacement runs 100% in your browser using the JavaScript RegExp engine. Your patterns and test strings are never transmitted to any server. The only server call is for the optional JSON/CSV export endpoint, which is rate-limited to 60 requests per day.
ReDoS (Regular Expression Denial of Service) occurs when patterns with nested quantifiers like (a+)+ or overlapping character classes cause the regex engine to take exponential time on crafted inputs. The detector flags patterns containing common ReDoS-prone structures. It is a heuristic check — not a guarantee.
Wrap part of your pattern in parentheses to create a capture group — e.g. (\d{4})-(\d{2})-(\d{2}) creates three groups for year, month, day. Groups are numbered left-to-right from 1. Use (?:...) for non-capturing groups when you need grouping without capture. Named groups use (?<name>...).
Greedy quantifiers (*, +, ?) match as much as possible and give back only when required. Lazy versions (*?, +?, ??) match as little as possible. Example: against <b>bold</b>, the pattern <.*> matches the whole string (greedy), while <.*?> matches only <b> (lazy).