Regex Tester

By the ToolPocket team · Updated 2026-12-05 · Editorial standards

Regular expressions are powerful and easy to get wrong. A tester lets you try a pattern against realistic text before it goes into production, where a subtle error becomes a bug.

This tool uses JavaScript's regular expression engine, so the results match what you would get in the browser or Node.js. Matches, positions and capture groups are listed below.

Runs locally in your browser — nothing is uploaded.

How to use the Regex Tester

  1. Enter a pattern, without the surrounding slashes.
  2. Choose flags such as g, i or m.
  3. Paste test text and press Test to see the matches.

Frequently asked questions

Which flavour of regex is used?

JavaScript (ECMAScript). Lookbehind and named groups work in current browsers; some older engines may not support them.

Why do I get only one match?

Add the g flag. Without it, the engine stops after the first match.

Is my text sent anywhere?

No. The pattern and text are evaluated locally and never uploaded.

Good to know

Regular expressions are written once and read many times, which is why a pattern that is hard to explain is usually wrong. If you cannot describe the match in one sentence, split the task into two patterns or handle it in code.

The tester shows positions and capture groups, which is usually enough to find the bug. Remember that JavaScript flags change behaviour: without the global flag the engine stops at the first match, and without the multiline flag anchors apply to the whole string.