Regex Tester Pro
Test .NET regex with capture groups, named groups, replacements, presets and a built-in cheat sheet.
Overview
Test a regex against a body of text with full match metadata: capture groups, named groups, replacement preview, match positions, and a side panel showing the cheat-sheet entry for each token in your pattern. Targets the .NET regex engine but supports the common flavours' shared subset.
It's for developers building log parsers, input validators, search-and-replace operations, or rewriting URLs - anywhere regex is the right tool and getting it right matters. Reach for it when iterating on a tricky pattern, validating a replacement before pasting it into code, or learning what each metacharacter in someone else's regex does.
How it works
The tester compiles your pattern with the .NET System.Text.RegularExpressions engine - a backtracking NFA with RegexOptions flags (IgnoreCase, Multiline, Singleline, IgnorePatternWhitespace). .NET's regex syntax is well-documented in Microsoft's regex reference and is largely compatible with PCRE for typical patterns.
Capture groups are displayed in order; named groups ((?<name>...)) are extracted by name. Replacement previews use the standard $1, ${name}, $& substitution syntax. Common presets (URL, email, IPv4) are available so you can compare your custom pattern against a known-good baseline.
Examples
- Capture date parts:
Pattern: (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2}) Input: "2026-05-18" Groups: year=2026, month=05, day=18 - Replacement:
Pattern: (\w+)\s+(\w+) Replacement: $2 $1 Input: "Alex Morgan" Output: "Morgan Alex" - Multiline match:
Pattern: ^Error.*$ Flags: Multiline -> matches each error line independently - IgnoreCase:
Pattern: foo Flags: IgnoreCase Input: "FOO Bar foo" -> two matches
FAQ
Is the .NET engine compatible with my JavaScript regex?
For the common subset, yes. Differences: .NET supports balancing groups and variable-width lookbehind that JS doesn't; JS supports sticky y flag that .NET doesn't.
What flags are supported?
IgnoreCase (i), Multiline (m), Singleline (s), IgnorePatternWhitespace (x), ExplicitCapture, RightToLeft. Hover any flag for a tooltip.
Why doesn't my regex match?
Common pitfalls: anchors (^/$) match line boundaries only with Multiline; \b requires word characters on one side; lookbehind requires the regex engine to support it. Check the cheat-sheet panel for token-level help.
How fast is it?
.NET regex is JIT-compiled on first use. Patterns with catastrophic backtracking still hang - the engine has a timeout safety net to prevent runaway evaluation.