by Mofi » Wed Feb 01, 2006 8:23 am
A possible workaround:
Close all open files. Then use Find In Files instead of Replace In Files and and let the search result be captured to the output window. Now you can evaluate the lines with your search string. If a line should be changed, double click on the line with the file name and the file will be opened. After opening all files where the replace should be done run a simple normal Replace with Replace All on all open files.
This workaround will not work if you have more than 1 search hit in a file and not all strings should be replaced by the new string in this file. Maybe you will find a better regular expression search string which only finds the strings which should be replaced.
An other workaround which does not have the limitation described above would be to use a macro. First run the Find In Files and capture the search results to an edit window. Look at the lines and delete those lines, where the replace should not be done. The macro now could open the remaining files, searches for each line and replace the string in this line. Maybe also GotoLine with the number in the clipboard (taken from the search result edit window) works, but I have never tested it.