In Writer, how do I replace an enter key (new paragraph mark) in find/replace with a comma and spacebar?

I have a list of names:

Kathy Brown
Imogen Brown
Nicola Brown

I want to remove the enter key and have the whole lot in one line, separated by a comma. I could do this on word in search/replace but can’t work out the Libre equivalent.

I am enjoying learning Libre Office very much and would like to thank you for developing it. Hope you can help!


Just tested it with LibreOffice V4.4.1.RC2 : The standard ‘Find & Replace’ will now do your job. Obviously the tool was enhanced.

“$” (without the quotation marks) in ‘Search For’

", " (Comma and space) in ‘Replace With’

Options as needed - ‘Replace All’

I haved just created an account to say thanks you :smiley:

Within Libreoffice, open “Find & Replace” (Ctrl H), select “Other Options” and enable “Regular Expressions”. You can then search for “\n” (line break) and replace with a comma (or comma space). There’s a very handy extension that simplifies this a bit and adds more functionality.

Revision to my previous answer, \n “in the Search for text box stands for a line break that was inserted with the Shift+Enter key combination” and will NOT find “enter key” paragraph marks. The Alternative Dialog Find & Replace Extension DOES allow searching for and replacing those paragraph marks.