Regex
Test a regular expression against sample text with live highlighting and every capture group broken out.
Runs in your browser — nothing you type here is sent anywhere.
Pattern
//gi
Presets
Flags
find every match, ignore case. Every match is listed either way — g only changes the literal you copy.
Subject
4
matches
ran as /…/gi
literal/(?<user>[\w.+-]+)@(?<domain>[\w-]+(?:\.[\w-]+)*\.[a-z]{2,})/gi
Subject, matches marked
ann.b+news@example.com ops@chance.dev bounced@@nope hello@sanders.io cc: Support <help@studio.co.uk>
Match list
#1 at 0
ann.b+news@example.com
$1ann.b+news
$2example.com
<user>ann.b+news
<domain>example.com
#2 at 24
ops@chance.dev
$1ops
$2chance.dev
<user>ops
<domain>chance.dev
#3 at 54
hello@sanders.io
$1hello
$2sanders.io
<user>hello
<domain>sanders.io
#4 at 84
help@studio.co.uk
$1help
$2studio.co.uk
<user>help
<domain>studio.co.uk
Regex is written by trial and error whether or not anyone admits it. The loop is faster when matches highlight as you type and you can see exactly which group caught what.
Matches are highlighted in the sample text, with each match's groups — numbered and named — listed separately. Flags are toggleable, and replacement can be previewed so you can check a substitution before running it anywhere real.
What people open it for
- Building a pattern against real sample data
- Checking which capture group holds the value you want
- Previewing a find-and-replace before applying it
In the terminal
tools regex
Every utility is also a command in the desktop's shell.