Tag Archives: geany

Find and Replace with Regular Expressions

Every once in a while I need to do some simple rearranging of text when receiving a file, most of the time this has to do with EDI or XML. Today’s issue was how to replace a tilde (~) with a carriage return, to denote the end of a line. It’s nice to know that both Open Office and Geany, to name just two, have no problem with this.

All I had to do is put in \n in the “Replace With” box and check Regular Expressions, now I have a 1010 line file neatly formatted. Before it was all on one line. Kudos to those much smarter than I for creating applications that do this at the push of a button.