This made me realize that we're not handling `$0` properly - it should get treated literally (I just tried it in JS and that seems to be what it does), but in our case we end up leaving the string unchanged since `match[0]` is always the whole matched string. Definitely an unlikely edge case, but easy enough to fix.