Loading…
Test and debug regular expressions with live matching and capture groups. Paste pattern and sample text.
Regex Tester is loading — interactive editor will appear here. Use examples below to try instantly once loaded.
Press ? for keyboard shortcuts
Real-time regex tester supporting flags (g/i/m/s/u/y), capture groups, named groups, and non-capturing groups with match highlighting. Includes a common patterns library, replace/split modes, an auto-escape feature, and a built-in cheat sheet.
Writing and debugging regular expressions is error-prone without instant feedback; this tool eliminates guesswork by showing matches live as you type. It also educates users through the cheat sheet and common patterns library.
This tool is part of the DevStackIO platform — a collection of free online developer tools from DevStackIO. Browse more free developer resources on DevStackIO.
Developers, data analysts, and anyone who needs to build, test, or debug regular expressions across any programming language.
Type or paste a regex pattern into the pattern input field; flags (g, i, m, s, u, y) can be toggled via checkboxes below it.
Enter test text in the input area; all matches are highlighted in real time with colors distinguishing capture groups.
Click a pattern from the Common Patterns library (email, URL, date, IP, etc.) to load it instantly.
Switch between Match, Replace, and Split modes using the tab bar above the output panel.
Refer to the cheat sheet by clicking the help icon; it covers anchors, quantifiers, character classes, and flags.
Use the auto-escape button to escape all special regex characters in a selected or pasted literal string.
Input: pattern /\b(\w+)\s\1\b/gi with text "hello hello world" → matches "hello hello" showing repeated word capture groupInput: pattern /(\d{4})-(\d{2})-(\d{2})/ in replace mode with replacement "$3/$2/$1" on "2025-12-25" → output "25/12/2025"What is the difference between greedy and lazy quantifiers?
Greedy (*, +) matches as much as possible; lazy (*?, +?) matches as little as possible while still satisfying the pattern.
Why does my regex match more than expected? You likely have an unanchored pattern or used a greedy quantifier
try adding ^/$ or switching to lazy.
What does the s flag do?
The s flag (dotAll) makes . match newline characters; without it, . matches everything except newlines.
Can I use named groups? Yes
use the syntax (?<name>...) for named capture groups. They appear in the match details panel.
Authoritative specifications, standards, and in-depth reading for Regex Tester.
Tool is loading — interactive editor will appear here. Use examples below to try instantly once loaded.
Quick regex syntax cheatsheet with examples. Use when looking up syntax; for live testing use regex-tester. Input: search text. Returns pattern snippets. 100% client-side.
Find JSONPath expressions by clicking any key. Use when querying APIs; for formatting use json-formatter. Input: JSON ≤10MB. Returns matching paths and values. 100% client-side.
Look up MIME types by extension and vice versa. Use when configuring uploads; for file checksums use file-checksum. Input: extension or MIME. Returns MIME mapping. 100% client-side.
Calculate chmod permissions from checkboxes or octal. Use when setting file modes; for git perms use git-cheatsheet. Input: mode or ticks. Returns octal and symbolic. 100% client-side.
Search common git commands with examples. Use as quick reference; for regex help use regex-memo. Input: search text. Returns command snippets. 100% client-side.
Analyze cyclomatic complexity and code metrics. Use when reviewing quality; for formatting use js-minifier. Input: code ≤10MB. Returns complexity scores. 100% client-side.
Show key code and key name for any pressed key. Use when debugging shortcuts; for regex keys use regex-tester. Input: key press. Returns code details. 100% client-side.
Build cron schedules with plain-English preview. Use for automation timing. Input: fields or presets. Returns expression + next runs. 100% client-side.
Learn the concepts behind this tool.
Browse all glossary terms2 matches found
user@example.comCapture Groups:
admin@test.orgCapture Groups:
All processing is done client-side. Your data never leaves your browser.