Regular Expression Tester

Test regex patterns with live match highlighting. See all matches, capture groups, and positions in real time.

Advertisement
/
/
Quick patterns:
Match Results
Enter a pattern above to start testing
Advertisement

About the Regular Expression Tester

A regular expression (regex) is a sequence of characters that defines a search pattern. Regex is used in programming for string searching, validation, parsing, and replacing text. This tool uses JavaScript's built-in RegExp engine to test your patterns in real time.

Regex flags explained

g (global) — find all matches, not just the first. i (case-insensitive) — match letters regardless of case. m (multiline) — ^ and $ match start/end of each line. s (dotAll) — the . character also matches newlines.

Common regex syntax

. — any character · \d — digit · \w — word character · \s — whitespace · ^ — start of string · $ — end of string · * — 0 or more · + — 1 or more · ? — 0 or 1 · {n,m} — between n and m repetitions · [abc] — character class · (abc) — capture group · (?:abc) — non-capturing group.

Common use cases

Validate email addresses, phone numbers, URLs, postal codes. Extract data from log files. Search and replace text in code editors. Parse structured text formats like dates or IP addresses.