Regex Tester | Test Patterns and Matches

Test regular expressions against sample text, inspect matches and groups, switch flags, and debug patterns before using them in code.

/ /
Invalid Regex pattern!
Match Results
0 match(es) found
No matches found.

What the Regex Tester Shows

The regex tester runs a pattern against sample text and shows matches, capture groups, flags, and errors so you can debug expressions before putting them into code.

Useful Regex Test Cases

Test patterns for emails, URLs, phone numbers, IDs, slugs, logs, CSV fragments, form validation, and find-and-replace rules using realistic sample text.

Check Before Production Use

A regex that works on one sample can fail on edge cases. Try empty input, punctuation, Unicode text, multiple lines, and unexpected spacing before relying on the pattern.

About This Tool

Regex Tester lets you write a regular expression and immediately test it against sample text to see which parts match. It shows match positions, captured groups, and flags in real time, making it far faster than testing regex patterns inside an application.

When to Use It

Use this when building a pattern to validate email addresses or phone numbers, when extracting specific fields from log files, or when learning regex syntax by seeing matches update live.

How to Use

  1. Enter your regular expression in the pattern field.
  2. Set any flags such as case-insensitive or multiline.
  3. Paste your test text into the input area.
  4. Matches are highlighted instantly as you type.
  5. Check the groups panel to verify captured subgroups.

Frequently Asked Questions

Which regex flavour does the tester use?

The tester uses JavaScript-compatible regex syntax, which covers the patterns used in most web applications and is widely documented.

Can I test multiline patterns?

Yes. Enable the multiline flag and the ^ and $ anchors match the start and end of each line rather than the entire string.

How do I see what each capture group matched?

The groups panel below the matches shows each numbered group and its matched value separately.