Okay wow. I didn't tools like this existed! There's been more than once where I've found myself in a situation like "find all code like this, change if this, delete if this". Regex can only get you so far.
Does someone know if this or something similar is available as a VSCode extension? It'd be fun to make one if not!