Skip to content

Regex Tester

Type a regular expression and some test text. Every match is highlighted and listed with its position and capture groups, named or numbered. Uses your browser's JavaScript engine; nothing you type is sent anywhere or put in the link.

Frequently asked questions

Which regex flavour does this use?

JavaScript's, the RegExp engine built into your browser. That is the same as Node.js and TypeScript. Lookbehind, named groups (?<name>…) and Unicode property escapes like \p{L} (with the u flag) work. PCRE-only features such as possessive quantifiers or recursion do not.

Why is the g flag always on?

So every match is listed, not just the first. Empty matches move on by one character, so a pattern like a* cannot loop forever.

What happens with a pattern that never finishes?

Some patterns, like (a+)+b on a long run of a's, backtrack for an extremely long time. The tester runs your pattern in a background worker and stops it after 1.5 seconds with a note, so the page never freezes.

Is my text sent anywhere?

No. The pattern and text stay in your browser. They are not uploaded, stored or written into the address, so Copy link shares the empty tool, not your text.