Test regular expressions
Write a pattern, drop in sample text, watch matches highlight live — with groups, flags and a replace preview.
Runs on your device
No uploads, ever
Free, no account
How it works
- Enter your pattern
JavaScript flavour — the same engine as your browser, so what you test here is what runs there.
- Paste sample text
Matches highlight as you type. Capture groups are listed with their content.
- Try a replacement
Use $1, $2 for group references and see the result before you commit it anywhere.
Questions people actually ask
Which regex flavour is this?
JavaScript (ECMAScript). Python, PCRE or .NET differences — lookbehind edge cases, possessive quantifiers — won't all translate, so test in the target language too.
Catastrophic backtracking?
A browser tab can still be hung by a vicious pattern; that risk is part of regex itself, not this page. Real text behaves.