I need to wrap all double quoted strings in all .cpp & .h file in a directory with a macro _T()
All files are unicode.
Can anyone help me write a perl or bash shell?
I know that perl should be great in it. I just know a bit of bash shell and cannot completely make it automatically working.
Now I use ^(?!#)(.*)(".*?")
and $1_T($2)
in sublime Text2, I don't know why it is just part of replace. ( some strings add _T() while some not). And some file like readme.txt *.poj etc should not be replace.
And avoiding repeat replace, I know the \b
is word boundary. But ^(?!#).*\b(!_T\(")(".*?")\b
seem not working.