Regex Tester Tool
Write a pattern, paste a test string and see exactly what matches.
How the Regex Tester Tool works
The pattern runs with your browser's own regular expression engine, so results match what JavaScript code, Node.js and many web tools will do. Matches are highlighted in the test string, and a details list shows the index, the matched text and each numbered or named capture group.
Toggle flags such as global, ignore case, multiline, dotAll and unicode with a click. The replace preview applies a replacement string using $1, $2, $& and $<name> so that you can check a substitution before using it in code.
Regex Tester Tool examples
Match email addresses with capture groups
Input
Contact support@convertcasepro.com or team@example.org for questions.
Result
Match 1: support@convertcasepro.com Match 2: team@example.org
When it is useful
- •Building and debugging a validation pattern for forms.
- •Extracting data from logs, text dumps and scraped content.
- •Testing a search and replace before running it on files.
- •Learning regular expressions by seeing groups and matches update live.
Frequently Asked Questions
Which regex flavor does it use?
JavaScript (ECMAScript). Features specific to PCRE, Python or .NET, such as possessive quantifiers or conditionals, may not work.
Why does my pattern match only once?
Without the global flag the engine stops after the first match. Turn on g to find them all.
Can a pattern freeze the page?
Patterns with nested quantifiers on long input can backtrack catastrophically in any engine. If the page stalls, simplify the pattern or shorten the test text.
Guides that use this tool
Related tools
- Text Diff CheckerPaste an original and a changed version to see exactly what differs.
- Find and Replace TextPaste text, enter what to find and what to put in its place, and see the result immediately.
- Extract Emails and URLsPaste a block of text and get a clean list of what you are looking for.
- Slugify URL GeneratorTurn any headline into a tidy, lowercase, hyphenated slug.
- JSON Formatter and MinifierPaste JSON to validate it and print it neatly, or compress it to a single line.