tools / regex-tester
.*
Regex Tester

Build and test regular expressions with real-time match highlighting, group extraction, and common presets.

Presets:
/
/
g global
m multiline
i ignore case
s dotAll
u unicode
Test String

What Is a Regex Tester?

A Regex Tester lets you write and test regular expressions interactively against sample text, with real-time match highlighting. Regular expressions (regex) are pattern-matching rules used for validation, extraction, search-and-replace, and text parsing across every programming language.

Real-Time Highlighting

Matches are highlighted as you type — no need to run your code to see which parts of the text match. Multi-match mode highlights all occurrences simultaneously with distinct colors for each capture group.

Regex Flags

The g flag finds all matches (not just first). i makes matching case-insensitive. m makes ^ and $ match line starts/ends. s makes . match newlines.

Built-in Presets

8 common patterns included: email, URL, IPv4 address, phone number, date, hex color, UUID, and URL slug. Use them as starting points or references for building your own patterns.

Capture Groups

Parentheses create capture groups that extract sub-matches. The tool shows each group's matched value in a table below the main match — essential for extracting structured data from unstructured text.