

Here's a screen shot of the document after that search-and-replace: Doc still runs into one large paragraph but with dummy LFs Incidentally, that's a space in the "Replace with" box. Try this yourself if you're not convinced. If I had done this step before the search-and-replace on the double line feed, the entire document would run into one large paragraph. Next, search for the single occurrence of the line feed, and replace with a space: That's a space in the "Replace with" box In the meantime, here's what the document will look like: Document after replacing double LFs with a placeholder I did this first instead of the single line breaks between lines within a paragraph. The regular expression for a line feed is \n. For this particular document, I chose "NewParagraphPlaceHolder": Search for double occurrences of LF But that's me - you can always just download the file and edit it directly.įirst thing to do is look for the double occurrences of the line feed (or new line, or spaces, if you prefer) that separate paragraphs, then change those to a sequence of characters that couldn't possibly appear in the text. If I had simply downloaded the file then opened it in Writer, it would've retained its Google Docs formatting, and I preferred to use my own, based on my style sheet. More precisely, I copied the text from Google Docs, then pasted it into a new OOo Writer document. To help you see regular expressions at work, I created the Google document below from a GMail message: Original text as imported from Google Docs Then I remembered Writer's Regular expressions option in the search dialog: Writer's search-and-replace

10 times my ticket was closed in 10 years telling me its not important feature that needs attention. I have opened 10 tickets with open office so far since it was star office and it cannot do basic new line search and replace.

An anonymous user left a comment claiming that he had opened 10 tickets regarding basic new-line search-and-replace. I remembered this when I read Optimise by Sukrit Dhandania in Linux User & Developer.

I could cursor to the end of each line, delete it, and type in a space, but my inner sloth told me there had to be a better way. Trouble is, the resulting file has hard new-line characters after every line, and a double new-line between paragraphs. When I'm ready to edit, I ask GMail to create a Google document out of it. I actually prefer that to an attached file, because I can read the article right away, without having to open another application. I've been editing the Philippine Star Trek fans' section of the New Worlds Alliance site for a few months now, and the contributors have been submitting their articles embedded in the email message.
