Regex Tester
Test and debug regular expressions with real-time matching.
//g
Ad Placeholder – after-tool
About This Tool
Write a regular expression and test it against your text with real-time match highlighting. See all matches, captured groups, and match indices as you type. Supports JavaScript regex flags including global (g), case-insensitive (i), multiline (m), dotAll (s), and Unicode (u). Includes a quick reference of common regex patterns for faster development. Essential for debugging complex patterns, validating input formats, and learning regex syntax. Everything runs in your browser with no data transmitted.
How to Use
- Enter your regular expression in the pattern field.
- Type or paste your test string in the text area below.
- Matches are highlighted in real time with group details shown below.
Ad Placeholder – mid-content
Frequently Asked Questions
- What regex flavor does this use?
- This tool uses JavaScript's built-in RegExp engine, which supports ECMAScript regex syntax. This is the same engine used in all modern browsers, Node.js, and Deno.
- What flags are supported?
- Global (g) to find all matches, case-insensitive (i), multiline (m) where ^ and $ match line boundaries, dotAll (s) where . matches newlines, and Unicode (u) for full Unicode support.
- Can I see captured groups?
- Yes. Each match shows its captured groups (parenthesized subexpressions) with their index and value, making it easy to debug complex patterns with multiple capture groups.
- What happens if my regex is invalid?
- The tool detects syntax errors in real time and displays a clear error message explaining what went wrong. Your test string is preserved so you can fix the pattern without re-entering your data.
- Is my data sent anywhere?
- No. All pattern matching runs entirely in your browser using JavaScript's native RegExp engine. No data is transmitted to any server.