Your data never leaves this tabRead the guide

Free Regex Tester Online

Test and debug regular expressions live — see all matches highlighted in your text as you type the pattern.

//
Test String
No matches yet.

How it works

1

Enter a pattern

Type your regex pattern into the pattern field. Optionally set flags (g, i, m, s).

2

Paste test string

Enter the text you want to match against in the test string area.

3

See live matches

Matches are highlighted in yellow instantly as you type. All match groups are shown below.

4

Inspect groups

Full match details including group 0, capture groups, and named groups are listed.

Common use cases

Input validation

Build and test email, phone, URL, or postcode validation patterns before embedding them in form validation code.

Log file parsing

Write regex to extract timestamps, error codes, or structured fields from log lines — test against sample log output first.

Search and replace

Test complex find-replace patterns with capture groups before running them in VS Code, sed, or your application code.

Learning regex

Experiment with patterns and flags to understand how anchors, quantifiers, lookaheads, and character classes work in real time.

Frequently asked questions

What regex flavor does this use?

JavaScript's built-in RegExp engine (ECMA-262). It supports most standard regex features including lookaheads, backreferences, named capture groups, and Unicode escapes.

What flags are supported?

g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match line boundaries), s (dotAll — . matches newlines), u (Unicode mode), d (indices).

What is the difference between match and exec?

Both find matches; exec returns one match at a time with full group info, match with global flag returns all matches. This tester uses exec in a loop so you see every match with its groups.

Why does my regex fail with "Invalid regular expression"?

Special characters like ( ) [ ] { } . * + ? ^ $ | \ must be escaped with \ if you mean them literally. For example, to match a dot use \. not just .

Can I test named capture groups?

Yes — use (?<name>pattern) syntax. The match details panel shows each named group alongside the numbered groups.

Are my patterns sent to a server?

No. Everything uses the browser's native RegExp — no server calls are made.