Developer

Regex Tester

Test regular expressions with live match highlighting, capture groups, and flags.

Processed entirely in your browser. Nothing is uploaded.

Input

Output

Highlighted text

Matches are highlighted here

Matches

No matches yet.

Enter a pattern to start matching.

About

About this tool

A regular expression, or regex, is a pattern for finding text, such as every email address or date in a document. Patterns are powerful but easy to get wrong, so testing them against sample text saves time.

Type a pattern, choose flags, and paste your text. Matches are highlighted and listed with their position and capture groups as you type. It uses JavaScript regex and runs locally.

Quick guide

How to use

  1. Type your pattern without the surrounding slashes.
  2. Choose the flags you need, such as g for global or i to ignore case.
  3. Paste test text and check the highlighted matches and groups.
Ideas

When to use it

  • Build a pattern to validate input such as emails or phone numbers
  • Extract numbers, dates, or IDs from text
  • Debug a pattern that matches too much or too little
  • Learn how groups and flags work
Common questions

Frequently asked questions

Which regex flavor does this use?

JavaScript (ECMAScript) regular expressions, the same engine your browser and Node.js use.

Why do I only see some matches?

This tool always searches the whole text, so every non-overlapping match is listed. The list shows the first 100 matches and counts up to 500.

Is there a size limit?

Test text is limited to 200,000 characters so a heavy pattern cannot freeze the page.