Regex Tester
Test and debug regular expressions in real-time. Everything runs in your browser — no data is sent anywhere.
Common Presets
Regular Expression
/
/
Test String
Highlighted Matches
Matches will appear here...
Results
0
Matches
0
Groups
0
ms
No matches found.
Quick Reference
.Any character (except newline)
\dDigit (0-9)
\wWord char (a-z, 0-9, _)
\sWhitespace
\bWord boundary
^Start of string/line
$End of string/line
*0 or more times
+1 or more times
?0 or 1 time
{n,m}Between n and m times
[abc]Character class (a, b or c)
(abc)Capture group
a|ba or b (alternation)
(?:abc)Non-capture group
(?=abc)Positive lookahead
About the Regex Tester
This free online regex tester helps you write, test and debug regular expressions. Whether you want to validate an email address, find URLs or parse text, this tool lets you instantly see which parts of your text match your pattern.
What is a Regular Expression?
A regular expression (regex) is a sequence of characters that defines a search pattern. Regex is widely used in programming languages like JavaScript, Python, PHP and Java for searching, validating and replacing text.
Features of this Tool
- Real-time match highlighting as you type
- Support for flags: global (g), case-insensitive (i), multiline (m) and dotall (s)
- Detailed results with capture groups and positions
- Common presets for email, URL, phone, IP address and date
- Handy quick reference for the most used regex syntax
- 100% client-side - your data never leaves your browser
Tips for Beginners
- Start with simple patterns and gradually build up complexity
- Use the preset patterns as a starting point
- Always test with multiple sample texts to discover edge cases
- Remember that special characters like
. * + ? ( ) [ ] { } \ | ^ $need a backslash to match them literally