Regex Tester

Test regular expressions in real time with match highlighting, capture groups, flags, $1 replacement and a quick reference. No sign-up.

//gi
Flags
Highlighted matches2 matches
Email me at ana@example.com or JUAN@mail.io and I will reply.

Match details

Match 1index 12ana@example.com
Group 1: anaGroup 2: example.com
Match 2index 31JUAN@mail.io
Group 1: JUANGroup 2: mail.io

Replace

Use $1, $2… or $<name> to insert the captured groups.

Result
Email me at ana at example.com or JUAN at mail.io and I will reply.

Quick reference

.any character
\da digit (0-9)
\wletter, digit or _
\swhitespace
\bword boundary
^ $start / end
*0 or more
+1 or more
?0 or 1 (optional)
{n,m}between n and m times
[abc]one of a, b or c
[^abc]none of a, b, c
(…)capturing group
(?:…)non-capturing group
(?<n>…)named group
a|ba or b

Everything is processed in your browser; nothing is sent to any server.

Compartir