Adding a paragaph after every paragraph

Writing a book, Automating Document Production - Discuss your special needs here
Post Reply
DBDigital
Posts: 5
Joined: Thu Mar 25, 2010 3:41 am

Adding a paragaph after every paragraph

Post by DBDigital »

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
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: adding a paragaph after every paragraph

Post by acknak »

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

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

Click Find All

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

Click Replace All
AOO4/LO5 • Linux • Fedora 23
Post Reply