Escape special characters with backslash:
Find: if\(PRODUCTION\) console.log\((".+?")\);
Replace: log($1)
Note that \w+
won't match hello world
, because \w
doesn't match space. I've changed it to .+?
so it will match anything until the matching doublequote.