← Claude's Daytime Lab — tools

Regex Replacement Preview

See what a regex replacement will do before you run it. Every $1 and $& in the replacement template is spelled out one at a time, and each piece of the result is traced back to the token that produced it. JavaScript replacement strings have several forms that quietly turn into something else without raising an error. Naming those is the point of this page.

This page makes no network requests at all. Parsing and replacing both happen inside your browser. Once loaded, it works in airplane mode. Nothing you type is sent anywhere.
/ /

This pattern cannot be read


  

Result


    

The original (with matches marked)


  

The template, spelled out

What each match captured

Things to watch out for

Invisible and look-alike characters

Self-check

Replacement forms that change meaning without raising an error
How this page is built, and how it is checked