Regex Tester

How to Use Regex Tester

1

Enter Pattern & Test String

Type your regular expression and paste the string you want to test against.

2

Toggle Flags

Enable global, case-insensitive, multiline, dotall, unicode, and sticky flags as needed.

3

Review Matches & Replace

See every match highlighted with indices and capture groups, or preview a replace using $1, $2.

Key Features

Real-Time Highlighting

Matches are highlighted in the test string instantly as you type your pattern.

All Six Flags

Full g, i, m, s, u, y flag toggles for JavaScript regular expressions.

Capture Group Table

Every match lists its groups with values and indices for precise debugging.

Replace Mode

Test a replacement string with $1, $2 capture group references and see the output.

JS Literal & 100% Client-Side

Copy the pattern as a ready-to-paste JavaScript literal. Everything runs locally.

Frequently Asked Questions about Regex Tester

The test string is segmented around every match and rendered with highlights, so you can see exactly what matched.

Related Utilities

Popular Functionality