Learn
History for this tool
The most recent data you entered in this tool, stored only in this browser.
Save what you type here, in this browser? Your work would go into this browser's local storage, so a refresh or a trip to another tool does not wipe it. You also get a short list of previous entries under the form, each one restorable with a click. Nothing is ever uploaded, and there is no account.
Being straight about the trade-off: anything kept there can be read by anyone who can use this browser profile, and by any script that later runs on this site. A tool page can hold a private key, a password or a signed token. Saving is convenient; it is not private.
Saved on this device
Your inputs and history are stored locally.
Not saved
This page forgets your work when you leave it.
About this tool
Test a regular expression against sample text and see every match highlighted as you type, with the capture groups listed separately. It uses JavaScript’s own regex engine, so what you see here is what you get in a script.Questions
- Why does my pattern behave differently in Python or grep?
- The dialects differ. JavaScript has no atomic groups or possessive quantifiers, and lookbehind support is comparatively recent. The tool shows which flags it is applying.
- Why does .* match more than I expected?
- Greedy quantifiers take as much as they can and then backtrack. Append ? to make it lazy — .*? stops at the first opportunity.