Regex Tester

Live highlighting of matches, capture groups and positions, plus a replace preview and built-in patterns for phone / email / URL / IP and more. Runs fully in your browser; nothing is uploaded.

Regular expression
/ / g
Common patterns (click to fill)
Test text Live match preview
Match details (first 200 shown)
Enter a pattern to list every match with its position and groups.
Replace (use $1, $2 to reference groups in the replacement; $& = the whole match)
AD · LEADERBOARD 728×90 (PLACEHOLDER — REPLACED WHEN ADSENSE GOES LIVE)

FAQ

What do the g, i, m, s and u flags mean?
g means global matching (find every result); i ignores case; m is multiline mode, so ^ and $ match the start and end of each line; s makes the dot . match newlines as well; u switches to Unicode code-point handling for emoji and rare characters. When testing matches, this tool always counts every match globally.
Does testing regexes online leak my data?
No. Matching, highlighting and replacement all run locally in your browser, and the text you enter is never sent to any server.
Why are there empty highlights in the results?
They come from zero-width matches such as \b, ^, $ and lookaheads like (?=...). These match a position rather than characters, so their length is 0 and the highlight block is hollow — that is normal.
Are there ready-made regexes I can use?
Yes. The tool ships with common patterns for phone numbers, email addresses, URLs, IPv4, dates, times, hex colors, integers, decimals and more — click a preset chip to fill it in and test immediately.