Regex tester online
Test expressions live, inspect matches, and use common presets without leaving the browser.
//
Match info0 matches
Test string
Characters: 148
Match highlight
.Any character
\dDigit
\wWord character
^/$Start / end
Regex pattern working?
If you want to ship the parser or text utility itself, DeployPages can host static developer tools quickly.
Deploy a tool siteWhy use an online regex tester?
Regex is one of the most useful tools for text processing, validation, parsing, and search logic. A live tester makes debugging faster because the expression, flags, matches, and sample text are visible together.
Regex cheatsheet
Character classes
| . | Match any character except a line break |
| \w | Match letters, digits, or underscore |
| \d | Match digits |
| \s | Match whitespace |
| [abc] | Match any listed character |
| [^abc] | Match any character not listed |
Quantifiers
| * | Match zero or more times |
| + | Match one or more times |
| ? | Match zero or one time |
| {n} | Match exactly n times |
| {n,} | Match at least n times |
| {n,m} | Match between n and m times |
Anchors
| ^ | Match the start of a string |
| $ | Match the end of a string |
| \b | Match a word boundary |
| \B | Match a non-word boundary |
| (?=p) | Positive lookahead |
| (?!p) | Negative lookahead |
Flags
| g | Global search |
| i | Case-insensitive mode |
| m | Multiline mode |
| s | Dot matches line breaks |
| u | Unicode mode |
Advanced FAQ
What is the difference between greedy and lazy matching?
Greedy matching consumes as much text as possible. Lazy matching adds ? after a quantifier so the engine stops at the earliest valid match.
How should I validate email addresses with regex?
Use regex for a practical first-pass check, but never treat it as final proof of ownership. Real validation should still involve a verification flow.