JavaScript regex tester

The example extracts users and domains from email addresses with named groups. Change the pattern or text and results update instantly.

Loading the editor…

Protected against catastrophic backtracking

Patterns run in a Web Worker. If one takes longer than 1.5 seconds (a classic sign of nested quantifiers like (a+)+ backtracking), the Worker is terminated and you get an explanation instead of a frozen tab.

Exactly your browser’s semantics

Matching uses the browser’s own RegExp engine, so results match what your JavaScript code will do, including the d, s, u, v and y flags, lookbehind and named groups. PCRE-only syntax such as possessive quantifiers is not available in JavaScript and will be reported as an error.

Questions

Does it support Python or PCRE regex?

No, only ECMAScript regular expressions as implemented by your browser.

How many matches are shown?

Up to 5,000 matches are collected; the table shows the first 200.

Can I use it inside the editor?

Yes. The editor’s find and replace (Ctrl/Cmd+F) supports regular expressions too.