Regex Tester
Test regular expressions live with match highlighting and groups.
Runs entirely in your browser — your data never leaves this page.
About the Regex Tester
This regex tester lets you build and debug regular expressions live against your own sample text, with matches highlighted as you type. Regular expressions are a powerful pattern-matching language used for search, validation, and text extraction across nearly every programming language.
Toggle flags like global, ignore-case, and multiline, and inspect every match along with its capture groups. It uses the JavaScript regex engine, so what you test here behaves exactly as it will in JS, TypeScript, and Node.js.
How to use it
- 1Type your regular expression in the pattern field (no slashes needed).
- 2Toggle flags such as g (global), i (ignore case), or m (multiline).
- 3Paste sample text into the test string box.
- 4See matches highlighted and inspect capture groups below.
Common use cases
- Writing validation patterns for emails, phones, and URLs
- Extracting data from logs or text
- Debugging a regex that is not matching as expected
- Learning regular expressions interactively
Frequently asked questions
Which regex flavor does this use?
It uses the JavaScript (ECMAScript) regular expression engine. Patterns behave identically in JavaScript, TypeScript, and Node.js. Some syntax may differ from PCRE, Python, or Java regex.
What do the flags mean?
g finds all matches instead of stopping at the first, i makes matching case-insensitive, m makes ^ and $ match line boundaries, s lets the dot match newlines, and u enables full Unicode matching.
How do I capture parts of a match?
Wrap the part you want in parentheses to create a capture group. The tool lists each group’s value under every match, so you can confirm your groups capture what you expect.