Adding a paragaph after every paragraph

Writing a book, Automating Document Production - Discuss your special needs here

Adding a paragaph after every paragraph

Postby DBDigital » Thu Oct 29, 2015 2:47 am

I have a interesting problem. I am trying to add a paragraph after every existing paragraph except if the line contains a bracket. Is there a way to do that?

I know if I search for $ with a replace of \n it will add paragraph another paragraph after every line but I want it to skip any time that there is a bracket in that line. I assume that is possible?
Openoffice 2.1 on Windows 2000
Posts: 5
Joined: Thu Mar 25, 2010 3:41 am

Re: adding a paragaph after every paragraph

Postby acknak » Thu Oct 29, 2015 4:02 am

Use two passes: 1) search for paragraphs that don't contain a bracket, then 2) add the paragraphs ONLY to the matching paragraphs.

Edit > Find & Replace
Search for: ^[^{}]*$
Options/Regular expressions: ON

Click Find All

Search for: $
Replace with: \n
Options/Current selection only: ON
Options/Regular expressions: ON

Click Replace All
AOO4/LO5 • Linux • Fedora 23
User avatar
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Return to Advanced Uses

Who is online

Users browsing this forum: No registered users and 0 guests