I have a bunch of code that I need to do a search and replace on to get it into the proper form for a new project. I need to remove a prefix from a bunch of identifiers, but I don’t want it to have any effect inside of a quoted string. For example if I have this code
#include "ABCmyfile.h"
class ABCmyclass
{
...
};
I would like the output to be
#include "ABCmyfile.h"
class myclass
{
...
}
I have to many different identifiers to search for, so I can’t just do ABCmyclass -> myclass, because that would take too long.
In regular expression mode, in the search and replace dialog I tried to search for
~:q<ABC
and replace it with nothing, but that’s not working.
Does anyone know of a search and replace regular expression that I could use to strip the prefix off of my identifiers?
Can’t you do it in three steps:
"ABCwith"__PLACEHOLDER__ABCwith nothing__PLACEHOLDER__withABC