Regex Tester – Free Online Regular Expression Debugger
Test and debug regular expressions with live match highlighting, flag controls, and capture group display. Supports full JavaScript regex syntax.
Regex testing made easy.
Quick Regex Reference ▾
.Any character (except newline)\dDigit [0-9]\wWord char [a-zA-Z0-9_]\sWhitespace^Start of string/line$End of string/line*0 or more+1 or more?0 or 1 (optional){n,m}Between n and m times[abc]Character class[^abc]Negated class(abc)Capture group(?:abc)Non-capture groupa|bAlternation (a or b)\bWord boundaryHow to Use
Enter your pattern
Type your regular expression in the pattern field. Flags can be toggled below.
Enter your test string
Type or paste the text you want to test against in the Test String panel.
See live results
Matches are highlighted in real time. Match details (index, groups) appear below.
Why Use Our Tool?
Real-time highlighting
All matches are highlighted instantly as you type — no need to click a button.
Capture group display
See each capture group value alongside the full match index and length.
Built-in cheat sheet
Quick reference for common patterns so you don't need to leave the page.
Copy regex
One-click copy of the full regex expression including flags.
Frequently Asked Questions
What regex syntax is supported?
JavaScript (ECMAScript) regex syntax. This supports character classes, groups, backreferences, lookahead/lookbehind, and all standard flags.
What flags are available?
g (global), i (case-insensitive), m (multiline), and s (dotAll — dot matches newlines). Toggle each flag independently.
Are capture groups shown?
Yes. Each match entry shows its value, index, length, and any capture group values.
Is there a quick reference?
Yes — expand the 'Quick Regex Reference' section at the bottom for a cheat sheet of common patterns.
Is my data sent to a server?
No. All regex evaluation runs in your browser using JavaScript's built-in RegExp engine.