Skip to content

Regex tester with live highlighting

Type a pattern, paste test text, and every match highlights instantly with its capture groups listed in a table below — no Run button, no page reload. A recipe library covers the patterns people reach for constantly (email, URL, Indian mobile number, PIN code, date), and a runaway pattern is caught and stopped automatically instead of freezing the tab.

  • Nothing you type leaves this page
  • Works offline once loaded
  • Free forever, no signup
/ /{{ flags }}

This pattern nests quantifiers, a shape that can cause catastrophic backtracking on the wrong input. It runs in a background worker with a 0.8-second watchdog, so it can never freeze this tab — a runaway match is aborted automatically with a warning below.

Highlighted
Matches & capture groups
#MatchGroups
{{ i + 1 }} {{ m.match }} ${{ gi+1 }}={{ g ?? '—' }}

How to use this tool

  1. Type your pattern and pick flags

    g for all matches, i to ignore case, m for multiline, s to let . match newlines.

  2. Paste test text

    Matches highlight live; the table below lists every capture group by number.

  3. Use a recipe or the replace preview

    Click a ready-made pattern from the recipe row, or switch on Replace to preview a substitution with $1-style group references.

Questions people ask

How do I test a regex online?

Type the pattern, paste some sample text, and matches highlight instantly — there is no Run button, and no text is ever sent anywhere; matching happens in a background worker inside your own browser.

What do the g, i and m flags mean?

g finds every match in the text instead of stopping at the first one; i makes matching case-insensitive; m makes ^ and $ match at the start and end of each line rather than only the whole string; s (dotAll) lets . match newline characters too.

What regex matches an Indian mobile number?

^[6-9]\d{9}$ — exactly ten digits, starting with 6, 7, 8 or 9, which is the valid starting-digit range for Indian mobile numbers. It is in the recipe row above, along with PAN, GSTIN, PIN code and a date pattern.

Why does my regex seem to freeze the page?

Nested quantifiers like (a+)+ can cause "catastrophic backtracking" against certain input — the matching engine explores an exponential number of paths trying to fail. This tool runs matching in a Web Worker with an 800ms watchdog, so a runaway pattern is stopped and flagged with a warning instead of ever freezing your tab.

Which regex flavor does this test against?

JavaScript (ECMAScript) — the same engine browsers and Node.js use. Most patterns transfer to other languages' regex flavors with only minor syntax differences (named groups and lookbehind support vary the most between engines).

Bookmark this page — the tool keeps working offline, and your settings stay in this browser. Built by Dynamb Technologies, who make software for a living.