Good idea! I thought using regexp would be slower somehow, but:
Problem: Regexp-replace all the 225800 occurrences of "~$" by "" TextWrangler: no difference TextMate: 4 mn
It seems that the search engine of TextMate performs far better on single lines... Thanks! A.