Regex Tester
Write a pattern, paste some text, and see every match highlighted live — including capture groups.
//gi
Advertisement
About this regex tester
This tool uses JavaScript's native regular expression engine, so patterns behave exactly as they would in a browser or Node.js script. Toggle flags like i (case-insensitive) or m (multiline) to see how they change which parts of your text match.
Every match is highlighted directly in your sample text, and any capture groups inside your pattern are listed separately below, which is useful when you're extracting specific pieces of data rather than just checking for a match.
Frequently asked questions
- What regex flavor does this use?
- JavaScript's built-in RegExp engine (ECMAScript syntax). Patterns written for PCRE, Python's re module, or other engines are mostly compatible but may differ on some edge cases.
- Why do I need the global (g) flag?
- Without it, JavaScript's matchAll only returns the first match. This tool enables it internally when finding matches so you always see every occurrence, regardless of whether you've checked the box.
- How do I test an email or URL pattern?
- Paste your candidate pattern into the field, then paste real-world example text (including cases that should NOT match) into the test string box to see how the pattern behaves.