Skip to content

Regex Tester

Test a JavaScript regular expression against your own text in the browser. Matches are highlighted with indices, and every match plus its groups is listed.

Pattern

Flags

Matches

5 matches.

Order 123 shipped on 2026-11-04 for user_42.
  1. 6123
  2. 212026
  3. 2611
  4. 2904
  5. 4142

JavaScript RegExp semantics — same engine as your code. The tool caps enumeration at 500 matches and 100,000 steps.

Your file is never sent to a server. It is read and processed by your own browser, and the results are not stored.

How to use it

  1. Enter the pattern between the slashes — without the slashes.
  2. Pick your flags; global is needed to list every match.
  3. Paste the test string and read the highlighted matches and the group table.

Limits worth knowing

  • JavaScript RegExp semantics; not PCRE and not Python re.
  • Catastrophic backtracking is not magically solved — enumeration is capped, not slowed for you.
  • Matches are listed up to 500; beyond that the tool says it stopped.
  • Text above 5 MB is refused to keep the tab responsive.

Flags, honestly explained

g finds every match; i ignores case; m makes ^ and $ match line boundaries; s lets the dot match newlines; u opens Unicode-aware matching; y anchors each attempt at lastIndex; v extends u with set notation; d exposes match indices. The tool rejects duplicates and unsupported letters outright.

Because the engine is the browser’s own, what you see here is what your application will do — the same quirks, the same errors, the same performance.

Reading catastrophic backtracking

If you paste a nested-quantifier pattern like (a+)+$ and a long input of a’s, your browser will take the hit exactly as your server would. The cap stops enumeration, not the CPU spin — rewrite the pattern instead.

Frequently asked questions

Does Regex Tester upload my files to any server?

No. Regex Tester runs in your browser, and the file is read there rather than sent to a server for processing. Our host still sees ordinary page-request metadata, which is described on the privacy page.

Is Regex Tester free to use?

Yes, Regex Tester is free, with no paid tier, no account, and no watermark added to your output. The limits are technical rather than commercial: file size, page count and supported formats are listed on this page.

What file formats and sizes are supported?

Regex Tester supports .txt files up to 5MB directly in your browser.

Which regex engine runs?

Your browser’s native JavaScript RegExp, so the results are exactly what your own code will produce — V8, SpiderMonkey or JavaScriptCore, whichever you use.

Can a bad pattern hang the page?

A catastrophic-backtracking pattern still burns CPU, but this tool caps enumeration at 500 matches and 100,000 iterations, then tells you it stopped. It cannot fix an exponential pattern — it can refuse to imitate it.

What about empty matches?

They are shown and counted, with the engine’s advancement handled safely — no infinite loop, no missing match at the end of the string.

Which flags are available?

d, g, i, m, s, u, v and y — the ones your engine supports, with duplicates rejected and invalid values named instead of swallowed.