Skip to content

Regex Tester

Regex Tester

Online Regex Tester with live matching, capture groups, named groups, and replacement preview for pattern validation, text extraction, and batch replacement.

/

/g

g

Global search

i

Case insensitive

m

Multiline

s

Dot matches newline

u

Unicode mode

y

Sticky match

Test Text

Replacement

Match Results

Enter a pattern to start matching

Replacement Preview

Regex Tester

Quick Start

1
Enter a regex pattern at the top, select flags (g/i/m/s/u/y), paste test text on the left — matches appear on the right in real time
2
Capture groups (...) and named groups (?<name>...) are expanded under each match showing captured values
3
Enter a replacement template ($1, $2, ${name}) and the "Replacement Preview" on the right shows the result instantly

Common Scenarios

Extract IDs, emails, dates, or custom tokens from logs, page source, or raw text.

Check whether a pattern matches correctly before wiring it into code, form validation, or search rules.

Batch-replace text structure or field content with capture groups and named groups.

Usage Advice

Prefer specific patterns over broad .* to avoid unexpected matches.
Use g for full scan and m/s when handling multi-line documents.
Always verify replacement output before applying it elsewhere.

Limitations & Compatibility

This tool uses your browser's JavaScript RegExp engine.
Very large text with complex patterns may still be slow.

Privacy & Security

All input is processed locally in your browser. You can replace, clear, and test again before copying or exporting.

FAQ

6

Continue with these related tools for the next step.