REAL-TIME REGEX TESTING · MATCH HIGHLIGHTING · CAPTURE GROUPS · REPLACE
//
g global
m multiline
i case-insensitive
s dotAll
u unicode
d indices
Enter a pattern above to see matches highlighted here.
0
MATCHES
0
GROUPS
0
LINES MATCHED
0
CHARS MATCHED
#
FULL MATCH
GROUPS
INDEX
🔄 REGEX REPLACE
📖 REGEX QUICK 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 (greedy)
+1 or more (greedy)
?0 or 1 (optional)
{n,m}Between n and m times
[abc]Character class
(abc)Capture group
(?:abc)Non-capturing group
a|bAlternation (a or b)
(?=abc)Positive lookahead
(?!abc)Negative lookahead
Free Regex Tester – Test Regular Expressions Online in Real-Time
By RapidTool Team · Last updated: September 2026
Our free regex tester lets you test, debug, and refine regular expressions with real-time match highlighting. See exactly which parts of your test string match your pattern, inspect capture groups, and test your regex replacement — all without writing any code.
Frequently Asked Questions
What regex flavor does this tester use?
This tester uses JavaScript's built-in RegExp engine, which follows the ECMAScript specification. It supports all standard regex features including lookaheads, capture groups, non-greedy quantifiers, character classes, and named groups.
What do the regex flags mean?
g (global) finds all matches instead of just the first. m (multiline) makes ^ and $ match line starts/ends. i (case-insensitive) ignores letter case. s (dotAll) makes . match newlines too. u (unicode) enables full Unicode support. d (indices) returns match index positions.
How do I use capture groups in the replacement?
Use $1, $2, $3... to reference the first, second, third capture group in your replacement string. For named groups (?<name>...), use $<name>. The full match is referenced with $&.
How do I match email addresses with regex?
A basic email regex: [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} — this matches most common email formats. For production use, email validation should be done server-side as regex can't validate domain existence.