Enter a regular expression (pattern) and a test string. Click Run to see all matches and capture groups. Use flags: g (global), i (case-insensitive), m (multiline). Syntax follows JavaScript RegExp. All testing runs in your browser — nothing is sent to a server.
About Regex Tester
A regular expression (regex) is a powerful pattern language used for searching, matching, replacing, and validating text in virtually every programming language and text editor. This tool lets you type a pattern and a test string, then instantly see all matches and capture groups. It uses JavaScript's RegExp engine, so the syntax is identical to what you would write in JS code — and closely matches Perl, Python, Ruby, and other implementations. All testing runs entirely in your browser, so your patterns and data remain private.
How to Use Regex Tester
- Enter your Pattern (e.g.
\d+for digits,\w+@\w+\.\w+for a simple email). - Check Flags if needed: g = all matches, i = ignore case, m = ^/$ match line boundaries.
- Paste or type the Test string and click Run. Results show each match and its capture groups. Invalid patterns display an error message.
Key Features
- Live matching with instant results — see matches and capture groups immediately
- Supports JavaScript regex flags: g (global), i (case-insensitive), m (multiline)
- Shows each match with index position and group contents
- Highlights invalid patterns with clear error messages
- 100% client-side — your patterns and test data stay in your browser
- Ideal companion to the Regex Escape tool for building literal-match patterns
Technical Details
JavaScript regex syntax includes: . \w \d \s [] () | * + ? {} ^$ and more. Escape special characters with \. The tool creates a new RegExp(pattern, flags) and runs matchAll() against your test string. Results show each match's full text and numbered capture groups. All execution happens in the browser with zero server interaction. Use the Regex Escape tool to safely embed literal strings into your patterns.
Conclusion
Whether you are a regex beginner or an experienced developer, this free Regex Tester provides a fast, private sandbox for building and debugging regular expressions. Test patterns, inspect matches and groups, and iterate — all within your browser with no setup required.