TOOL · 07

Regular Expression Tester

Write a pattern, paste your text — matches highlight live as you type, with index positions and capture groups.

Pattern

/ /

Output

Result appears here…

About regular expressions

A regular expression is a pattern language for matching text — email addresses, dates, log lines, almost anything. This tester uses your browser's native JavaScript RegExp engine with live feedback, supports the g, i, m and s flags, and shows every capture group. Nothing you type leaves the page.

Features

.*

Live matching

Matches highlight as you type — no run button needed.

( )

Capture groups

Every group of every match, listed with its index.

gi

Flag support

Toggle the g, i, m and s flags with one click each.

100% private

Uses your browser’s native RegExp engine — nothing uploaded.

How to use

  1. 1

    Write a pattern

    Type a regular expression in the pattern field.

  2. 2

    Paste test text

    Drop in the text you want to match against.

  3. 3

    Read the results

    Highlighted matches, counts, positions and capture groups update live.

Use cases

Email validation

Build and test patterns that match email addresses.

Log parsing

Extract fields from structured log lines.

Find & replace prep

Dry-run a pattern before running it in your editor.

Learning regex

See exactly what each part of a pattern matches.

Example

Pattern
\b[\w.+-]+@[\w-]+\.[a-z]{2,}\b
Matches
postmaster@tmpio.com
support@example.org

The pattern uses the same JavaScript RegExp syntax your browser uses — what you test here behaves identically in your code.

FAQ

Which regex flavor is this?

JavaScript (ECMAScript) regular expressions, executed by your browser’s native engine — the same as new RegExp() in your code.

Why do I see “Invalid pattern”?

The pattern has a syntax error — an unclosed bracket or quantifier, for example. The message shows where the engine gave up.

What do the flags do?

g finds all matches (not just the first), i ignores case, m makes ^ and $ work per line, and s lets . match newlines.