A short companion for Regex Tester: when it is useful, what it expects, and what to check before using the result.

What it does

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.

Use the tool

Open Regex Tester, add the input the tool asks for, run it, and check the output before using it elsewhere.

Input and output

  • Input: text.
  • Output: text.
  • Category: Workflow.

Privacy and processing

Processing happens locally in your browser. This tool does not upload the input to ilham.dev.

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.

Related guide

For broader background, see Testing Regex Before Shipping It.