replacement of C-identifiers
Posted: Mon Jan 31, 2005 5:32 pm
Hi,
I tried to "batch replace" all C-identifiers named "xy" by "ab" using the following reg.exp. for the find:
\Wxy\W
For the replacement I used:
ab
Obviously, the non-alphanum character before "xy" and the non-alphanum char after "xy" get removed during this process: The C-file is no longer compilable. But I need such to check for \W because there exist C-identifiers "xyz" which should not be touched.
Any suggestions?
Additionally: how can I tell the "batch replace" to ignore all entries found in C-comments (both multi-line /*...*/ and single line //) ?
Thanks alot,
Friedrich
I tried to "batch replace" all C-identifiers named "xy" by "ab" using the following reg.exp. for the find:
\Wxy\W
For the replacement I used:
ab
Obviously, the non-alphanum character before "xy" and the non-alphanum char after "xy" get removed during this process: The C-file is no longer compilable. But I need such to check for \W because there exist C-identifiers "xyz" which should not be touched.
Any suggestions?
Additionally: how can I tell the "batch replace" to ignore all entries found in C-comments (both multi-line /*...*/ and single line //) ?
Thanks alot,
Friedrich