Change a list with colons to list with new lines in linux (fedora)

The other day I needed to remove double line breaks from a list to quickly put it in a spread sheet. Similarly, today I needed to change a list like:

Heading

Item; Item; Item;

Into

Heading

Item
Item
Item

In order to put it into a spreadsheet.

Here is what I did:

I pasted the list into the default Gnome Text editor and used Find and Replace dialogue (in “hamburger” menu) with “; ” (colon space) in find and “\n” in replace which stands for new line. On Mac or Windows other expressions are used for new line, either (\r\n) or (\r). You could try \r\n?|\n if you are unsure.

Leave a Reply

Your email address will not be published. Required fields are marked *