I have a file, with a lot of instances of
... fclose(f1); fclose(f2); fclose(f3); ... I'd like to replace these with
... if(fclose(f1)!=0) return 1; if(fclose(f2)!=0) return 1; if(fclose(f3)!=0) return 1; ... But, other than doing two separate search-and-replace, i haven't found a way to do this, which preserves the argument. I think the regex version of search-and-replace may be able to do this, but I'm not nearly proficient at regexes to know how.