Advertisement
/
/
Replacement String
Test String
Replace Result
Match List
Enter a regex pattern to see matches
Capture Groups
Groups will appear here when matched
📚 Common Patterns
📖 Regex Cheat Sheet
Character Classes
.Any character (except newline)
\dDigit [0-9]
\DNot a digit
\wWord char [a-zA-Z0-9_]
\WNot a word char
\sWhitespace
\SNot whitespace
[abc]Any of a, b, or c
[^abc]Not a, b, or c
[a-z]Range a to z
Quantifiers
*0 or more
+1 or more
?0 or 1 (optional)
{n}Exactly n
{n,}n or more
{n,m}Between n and m
*?Lazy (non-greedy)
Anchors & Boundaries
^Start of string/line
$End of string/line
\bWord boundary
\BNot a word boundary
Groups & Lookaround
(abc)Capture group
(?:abc)Non-capture group
(?<name>abc)Named group
\1Backreference
(?=abc)Positive lookahead
(?!abc)Negative lookahead
(?<=abc)Positive lookbehind
(?<!abc)Negative lookbehind
a|bAlternation (or)
Online Regex Tester — Test Regular Expressions in Real-Time
This free regex tester uses JavaScript's native RegExp engine to test and debug your regular expressions in real-time. As you type your pattern, matches are highlighted instantly in the test string, with capture groups color-coded for easy identification.
Features
- Real-time matching — See matches highlighted as you type
- Capture groups — Color-coded groups with named group support
- Replace mode — Test regex replacements with
$1,$&references - Common patterns — One-click templates for email, URL, IP, etc.
- Performance timing — See execution time for your pattern
- Cheat sheet — Quick reference for regex syntax
JavaScript Regex Engine
This tester uses the JavaScript (ECMAScript) regular expression engine. Supported flags: g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode). Features like lookbehind ((?<=...)) require a modern browser.