About This Tool
This regex tester helps you build, test, and debug regular expressions in real-time. Enter your pattern and test string to see matches highlighted instantly. Supports all JavaScript regex flags including global, case-insensitive, and multiline modes.
Regex Tester
Highlighted Matches
Match Details
Common Patterns
How to Use
- Enter your regular expression pattern in the first input field
- Set the flags (g for global, i for case-insensitive, etc.) using the quick toggle buttons or type them manually
- Enter or paste the text you want to test against in the test string area
- Matches are highlighted automatically in real-time as you type
- View match details including captured groups and positions on the right panel
Regex Flags Explained:
- g (global): Find all matches, not just the first one
- i (case-insensitive): Match regardless of letter case
- m (multiline): ^ and $ match start/end of each line
- s (dotall): Makes . match newline characters too
- u (unicode): Enable full Unicode support
Frequently Asked Questions
What is a regular expression (regex)?
A regular expression is a sequence of characters that defines a search pattern. It's used for pattern matching in text, such as finding email addresses, phone numbers, or validating input formats.
Which regex flavor does this tester use?
This tester uses JavaScript's built-in RegExp engine. The syntax is compatible with most modern regex implementations and supports ES2018 features like named groups and lookbehind assertions.
Why isn't my pattern matching anything?
Common issues include: missing the global flag (g) to find all matches, forgetting to escape special characters like . or *, or having case sensitivity issues (try adding the 'i' flag).
How do I escape special characters?
Special regex characters like . * + ? ^ $ { } [ ] ( ) | \ need to be escaped with a backslash. For example, to match a literal dot, use \. instead of just a period.
Is my data secure when using this tool?
Yes, completely. All regex testing happens locally in your browser using JavaScript. Your patterns and test strings are never sent to any server or stored anywhere.
Can I use capturing groups?
Yes! This tester fully supports capturing groups. Use parentheses to create groups, and the match details panel will show all captured group values for each match.