I am trying to remove the following function from all my working files, while leaving the first argument intact. The second argument changes every time.
dotranslate( "Arg1", "Arg2" )
I am trying to do this using Notepad++, but I just can’t seem to get it right.
If your strings can contain escaped quotes, this will be quite difficult. If not, you can go with this:
So this will match
dotranslate(, then optional spaces, then capture a string. The string is written as"[^"]*". So quotes, as many non-quotes as possible and quotes again. And then we just match spaces, comma, spaces, string, spaces, closing parenthesis.And replace that with what we captured in the first (and only) set of unescaped parentheses. Which is the first string.
If
Args1should not be variable, simply write the specific value into the capturing group.