Loona Automation logoLoona Developer Tools
Home › Developer Tools › Regex Tester

Regex Tester - Live Matches, Groups and Highlights

In short: the Regex Tester runs your pattern against your test text as you type, highlights every match, lists each capture group and shows the total match count - and reports invalid patterns with the browser error message.

Regular expressions are write-once, puzzle-over-forever. Paste a pattern and some sample text below and see exactly what matches, where, and what each capture group caught - before the pattern ever reaches your code.

(nothing yet)
Private by design: everything in this tool happens 100% in your browser with JavaScript. Your input is never uploaded to a server, never stored and never seen by us - close the tab and everything is gone.

How to use the Regex Tester

  1. Type your pattern in the Pattern box (without the surrounding slashes).
  2. Set flags such as g (global), i (ignore case) or m (multiline) in the Flags box.
  3. Type or paste the test text - results update live as you type.
  4. Read the highlighted text and the match table: every match with its position and capture groups.

How it works

The tool builds a JavaScript RegExp from your pattern and flags and executes it against the test text. With the global flag set it walks through every match in order; without it, it reports the first match only, exactly like your own code would. Zero-width matches (for example from x*) are handled safely - the walker advances one character after each empty match so it can never loop forever. The highlight view escapes your text to safe HTML first, then wraps each match in a highlight marker, so what you see is precisely what matched.

Worked example

The pattern (\d{4})-(\d{2})-(\d{2}) against "Release on 2026-11-08, hotfix on 2026-11-09" finds 2 matches, and the table shows group 1 = 2026, group 2 = 11, group 3 = 08 for the first - ready to reuse in a date parser.

Frequently Asked Questions

Is this regex tester free?

Yes - completely free, with no sign-up and no daily cap.

Which regex flavour does it use?

JavaScript regular expressions - the flavour used by browsers and Node.js. Most patterns from other flavours (PCRE, Python) work the same, but a few constructs differ, such as named groups which JavaScript writes as (?<name>...).

Why do I only see one match?

Without the g flag a regex stops at the first match. Add g in the Flags box to find them all.

What are capture groups?

Each pair of parentheses in your pattern captures the text it matched. The table lists them per match - group 1 is the first opening parenthesis, and so on. Groups written (?:...) do not capture.

Is my text uploaded to a server?

No. The pattern runs 100% in your browser against text that never leaves your device.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.