Regex Tester
Test regular expressions in real-time with match highlighting, flag options, and common pattern presets.
Processed in your browser
Presets:
Recommended ToolAffiliate
GitHub Pro
Advanced code review, CI/CD, and collaboration for developers.
What is Regex Tester?
A regex (regular expression) tester lets you write and test patterns against sample text in real time. Regular expressions are a powerful string-matching language used in programming, text editors, and command-line tools to search, validate, and transform text.
How to Use
- Enter a regex pattern in the pattern field
- Type or paste your test string below
- Toggle flags (g, i, m, s) to modify matching behavior
- View highlighted matches and detailed match information including captured groups
Frequently Asked Questions
- What do the regex flags mean?
- g = global (find all matches), i = case-insensitive, m = multiline (^ and $ match line boundaries), s = dotAll (. matches newline characters too).
- How do I match an email address with regex?
- A common pattern is [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}. Use the Email preset for a quick start.
- What are captured groups?
- Parentheses () in a regex create capture groups that extract specific parts of a match. For example, (\d{4})-(\d{2})-(\d{2}) captures year, month, and day separately from a date string.