Regex Tester — Online Match, Replace & Split for Perl, C#, sed, Bash, Go, grep, PowerShell & Ruby

Regex Tester

Regex tester — match, replace & split

Free online regex tester for Perl, C#, sed, bash, Go/Golang, grep, PowerShell, and Ruby-style workflows. Paste a pattern, test string, and see results instantly.

2 matches
Contact alice@example.com or bob@asli.dev today.
#IndexMatchGroups
18alice@example.com
229bob@asli.dev

Sample tests

Load a sample to quickly test regex patterns — useful when comparing Perl, sed, bash, or C# workflows.

Language & tool flavors

Perl regex tester, test regex C#, sed / bash / grep, Go golang regex test, PowerShell, and Ruby notes — how to run the same idea in each environment.

Perl regex tester notes — m//, s///, and qr// for match/replace workflows.

  • Test with: perl -ne 'print if /pattern/'
  • Replace: s/pattern/repl/g — like this page’s Replace mode.
  • Use (?i) inline or /i for case-insensitive Perl test regex runs.
if ($text =~ /(?i)\berror\b/) {
  $text =~ s/\berror\b/ALERT/gi;
}

Regex Tester for Perl, C#, sed, Bash, Go & More

Free online regex tester with match, replace, and split. Use it as a Perl regex tester, sed regex tester, bash regex tester, or to test regex C# and Go / golang regex test patterns before shipping code.

Perl regex tester
Test regex C#
Sed regex tester
Bash regex tester
Go regex test
Golang regex test
Perl test regex
Regex perl tester
Regex sed tester
Regex tester bash
Sed regex test
Grep regex tester
PowerShell regex tester
Ruby regex tester
Sed test regex
Regex powershell tester
Regex ruby tester

Frequently asked questions

What is a regex tester?
A regex tester lets you paste a regular expression and a sample string, then instantly see matches, replacements, or split parts — useful before you run the same pattern in Perl, C#, sed, bash, Go, grep, PowerShell, or Ruby.
Can I use this as a Perl regex tester?
Yes. Match and Replace modes mirror common Perl m// and s/// workflows. The Perl flavor tab shows how to perl-test regex patterns on the command line.
Does this help test regex C# patterns?
Yes. Use Match/Replace here, then copy the pattern into Regex.Matches or Regex.Replace in C#. The C# tab covers flags and verbatim strings for test regex C# work.
Is this a sed or bash regex tester?
Replace mode is a practical online stand-in for sed -E 's/pat/repl/g'. Bash and grep tabs explain [[ =~ ]] and grep -E so you can validate before a shell regex tester run.
Can I go / golang regex test here?
You can prototype patterns interactively, then adapt them for Go’s RE2 regexp package. Note: Go lacks lookbehind and backreferences — the Go tab calls out those limits.

Whether you need a regex perl tester, regex sed tester, grep regex tester, or a powershell / ruby regex tester, validate the pattern here first. Then copy the same idea into sed -E, grep -E, [[ =~ ]], Regex.Replace, or regexp.MustCompile for a confident go regex test in production.