Regular Expression Tester
Write and test regular expressions against a string, with live match highlighting.
//
2 matches
Regex Cheatsheet
.Any character except newline\wWord character (a-z, A-Z, 0-9, _)\dDigit (0-9)\sWhitespace (space, tab, newline)[abc]Any of a, b, or c[^abc]Not a, b, or c^Start of string$End of string*0 or more+1 or more?0 or 1{3}Exactly 3What is this tool?
A Regex Tester lets you write a regular expression and see which parts of a test string it matches, highlighted in real time.
How does it work?
The tool compiles your pattern using the JavaScript RegExp engine and highlights every match in the test string.
How to use Regex Tester
- Enter your pattern in the "/" input.
- Set any flags (e.g. "g", "i").
- Edit the test string to see matches highlighted.
Common Use Cases
- Validating email and phone formats
- Parsing log files
- Building search/replace patterns
Pro Tips
- Use the "g" flag to find all matches, not just the first one.
Frequently Asked Questions
Which regex flavour is used?
JavaScript's built-in RegExp engine, which is compatible with most modern regex patterns.
How do I test a case-insensitive match?
Add the "i" flag in the flags input next to the pattern.