Test a regular expression against log lines, config files or command output. See every match with numbered and named groups, preview a replace, and copy the equivalent PowerShell command. Runs entirely in your browser.
Replace preview
PowerShell equivalent
How to use it
Pick a preset or type your own pattern (without surrounding slashes) and flags.
Every match is listed with its position, numbered groups and named groups (?<name>...). Without the g flag only the first match is returned, the same as JavaScript exec() and PowerShell -match.
The PowerShell line uses -creplace unless you set i, because PowerShell -replace and -match ignore case by default. .NET writes named groups in replacements as ${name}, and the snippet converts that for you.
Nested quantifiers like (a+)+ can hang any regex engine on long input, so test against real log samples before putting a pattern in a script or SIEM rule.