Power your website with Hostinger — Get 20% OFF

Claim Discount →
⚙️ Developer Tools

Regex Tester

Test regular expressions live with real-time match highlighting. Supports flags: global, case-insensitive, multiline, dotAll. Shows all matches with positions.

Enter a pattern
/ /
0 matches
Matches will be highlighted here…

How to Use a Regex Tester

Regular expressions (regex) are patterns used to match character combinations in strings. They're used in virtually every programming language for search, replace, validation, and parsing operations.

Enter your pattern in the field above (without the slashes), select your flags, and type or paste your test string. Matches are highlighted in real-time in yellow. Below the highlighted output, each match is listed with its exact character position.

FAQ

What does the 'g' flag do?

The global flag makes the regex find all matches in the string, not just the first one. Without 'g', the regex stops after finding the first match.

What is a capture group?

Parentheses () create capture groups that let you extract specific parts of a match. For example, (\d{4})-(\d{2})-(\d{2}) matches a date and captures year, month, and day in separate groups.

hostinger

Need Hosting?

Get 20% OFF on Hostinger hosting — exclusive for CodLeads users

Get Discount