Text editor to search/replace newlines and tabs
Text Edit which is available out of the box supports searching for special characters:


Access "find" functionality with Cmd-F
Click the small magnifying glass at the beginning of the entry field and select "Insert Pattern" (last entry)
Pick your pattern (and repeat if necessary)





Move the cursor to the replacement field to select a pattern there (or just copy/paste from the search field)




If you do a lot of text-based file processing it might help to spend some time to learn about basic Unix tools like awk, sed and friends. This would make thinks a lot easier on the long run.