Regex Tester

Test regular expressions in real time with live match highlighting

Regular Expression
Test String
Match Results
Matches: 0
Regex Reference
.Any single character \dDigit (0-9) \wWord char (a-z,0-9,_) \sWhitespace ^Start of line $End of line *0 or more +1 or more ?0 or 1 [abc]Character class (group)Capture group a|ba or b \bWord boundary {{n}}Exactly n times
FAQ
What is a regular expression?
A regular expression (regex) is a search pattern syntax for matching strings. It's widely used for email validation, phone number extraction, data parsing, and text processing.
What are the flags (g, i, m)?
g (global) finds all matches. i (case-insensitive) ignores uppercase/lowercase. m (multiline) makes ^ and $ match line starts/ends instead of string starts/ends.
Can I test with special characters?
Yes. This tester supports all JavaScript regex features including Unicode, lookahead/lookbehind, and character classes.
Advertisement (AdSense)

What Is Regex?

Regular expressions are powerful patterns for searching, extracting, and replacing text. Used in programming, data analysis, text processing, and virtually every development field.

Common Regex Patterns

Email: \w+@\w+\.\w+ | Phone: \d{3}-\d{3}-\d{4} | URL: https?://\S+ | Numbers: \d+ | Trim: ^\s+|\s+$