Regex Tester

Test regular expressions against sample text in real time with match highlighting.
Pattern & TextReady
Regular expression
//
Test text
Replacement text ($1, $2 reference capture groups)
Matches0 matches

Matches are highlighted here as you type. Capture groups are shown per match below.

Match details
#Matched textPosLenGroups
Regex cheatsheet
Anchors^ start $ end \b word boundary
Character classes\d digit \w word \s whitespace [a-z] range [^abc] negated
Quantifiers* 0+ + 1+ ? 0-1 {n,m} n to m
Groups & escapes(exp) capture (?:exp) non-capture \. literal dot \\ backslash
Tool Introduction

Write a regular expression, watch matches highlight in your text as you type, and inspect every capture group in the details table. Test, replace with $1-style backreferences, and copy matches as plain text or TSV for spreadsheets.

Flag buttons cover the common switches (i, g, m, s, u, y), and the presets drop in ready-made patterns for email, URLs, phone numbers and more.