I have a plain text file with a large number of lines with a blank line between each pair of lines. I want to remove the empty lines.
I am trying using the Replace dialog with regex, to replace '\n\n' with '\n', but the search does not recognize '\n' as the new line character.
In the Files pane of the Preferences dialog, the 'default end of line character' is set to Unix (LF)
and with 'View/Show Line Endings', each line is terminated with a 'LF' icon -- or what looks to me to be an icon.
I have tried \p
and \r
but they don't work either.
It is a plain text file so I know there are other approaches to removing the blank lines, but I am interested in what's going on here with geany. How could I do this using the geany replace dialog?
Update I can get a match using $
as the search key but the replace all
does not replace the endline character, it instead inserts before it.