Regex tester, debugger & match explainer
Test and debug regular expressions with real-time match highlighting, capture group inspection, and string replacement. Evaluated safely in your browser with built-in catastrophic backtracking protection.
Regex syntax cheat sheet
| Character | Class | Description |
|---|---|---|
\d / \D | Digits | Matches any digit (0–9) / any non-digit. |
\w / \W | Word characters | Matches any alphanumeric character or underscore / non-word. |
\s / \S | Whitespace | Matches spaces, tabs, line breaks / non-whitespace. |
^ / $ | Anchors | Beginning / end of string or line (with m flag). |
[abc] | Character set | Matches any single character enclosed in brackets. |
+ / * / ? | Quantifiers | 1 or more / 0 or more / 0 or 1 optional match. |
(?<name>...) | Named group | Captures matched subgroup into a named property dictionary. |
Active regex flags
- g (Global) — Find all matches rather than stopping after the first match
- i (Ignore Case) — Case-insensitive matching
- m (Multiline) — Treat beginning and end anchors (
^and$) as working per-line - s (DotAll) — Allows
.to match newlines - u (Unicode) — Treat pattern as a sequence of Unicode code points
Frequently asked questions
Is regular expression evaluation protected against ReDoS?
Yes. DevSandbox includes an execution iteration limiter and regex safety checks to prevent catastrophic backtracking from freezing your browser tab.
Does the regex tester support named capture groups?
Yes. It supports named capture groups (?<name>...), standard capturing parentheses, non-capturing groups, and all modern regex flags (g, i, m, s, u).