Skip to the tools
All kits

Regex tester

Write a pattern, pick your flags, and watch the matches highlight as you type.

Matching runs in a worker with a two second limit, so a pattern that would otherwise hang the tab is stopped instead.

Flags

0 matches

ahad@example.com and someone@other.com

Matching runs in a worker and is stopped after 2 seconds. A pattern that nests one repeat inside another, like (a+)+, can take longer than the universe has left on input that nearly matches, and a regex cannot be interrupted once it starts. Killing the worker is the only way to get the page back.

Questions

Is what I paste sent anywhere?
No. Every tool in this kit runs in the page itself. There is no server here that receives what you paste, and you can check it in your browser's network tab: using a tool produces no request carrying your input at all.
Why does matching get stopped after two seconds?
Because a pattern that nests one repeat inside another, like (a+)+b, can take longer than the universe has left on input that nearly matches. JavaScript cannot interrupt a regex once it starts, so the only way to get the page back is to run it somewhere that can be terminated. That is what the worker is for.
Which flavour of regex is this?
JavaScript's own, exactly as your browser implements it. So lookbehind and named groups work, and things that only exist in PCRE, like recursion or possessive quantifiers, do not.
Are named groups supported?
Yes. Write (?<name>...) and every match lists the group by name as well as by number.
Why does it stop at a thousand matches?
Because past that the list stops being something you read and starts being a memory problem. The tool says when it has stopped early rather than quietly showing you part of the answer.

The other tools here