Regex Tester
Test regular expressions against sample text with live match highlighting. Supports the common flags (g, i, m, s, u, y), reports invalid patterns with clear messages and lists every match with its capture groups.
Enter a pattern and your test string; matches highlight live and are listed below with capture groups shown in distinct colors. Watch mode pauses any CPU-heavy matching until you hit the tick button.
Regular expression
Test text
/https?://[\w.-]+(?:/[^\s]*)?/g — 182 chars
Matches highlight live
Matches
2- #143–88
https://devworkbench.net/docs/getting-started - #297–131
https://github.com/search?q=nextjs
full match · g1 · g2
Runs locally on your browser's engine. Group offsets come from the native d flag, so duplicates stay exact. Pathological patterns are stopped after 400ms.
Frequently asked questions
How do I make my regex case-insensitive?
Check the i flag (or append the i modifier). Other common flags are g (global), m (multiline) and s (dotal — makes . match newlines).
Why is my pattern slow to process large text?
Some patterns cause catastrophic backtracking. The tester enforces a time budget and shows matches progressively so the page never freezes.