Code Utility Hub
← All tools

Regex Tester

Test regular expressions against text in your browser — no data leaves your machine.

How this works

Enter a pattern and a test string to see every match highlighted, plus any captured groups. Matching always runs in a background worker with a timeout, so a runaway pattern can't freeze the page.

Common uses

FAQ

Which regex flavor does this use?

Your browser’s native JavaScript RegExp engine — the same one Node.js and any JS codebase uses.

What happens with a catastrophic pattern like (a+)+$?

It’s stopped automatically after about a second. Matching runs in a background worker with a timeout, so a pathological pattern can’t freeze the tab.

Why did I get more matches than I expected?

The tester always searches globally (it adds the g flag internally) so you can see every match, even if you didn’t type g yourself.