View Single Post
Old 01-10-2011, 08:10 AM   #1
schuster
Zealot
schuster doesn't litterschuster doesn't litter
 
Posts: 116
Karma: 100
Join Date: Jan 2011
Location: Germany / NRW /Köln
Device: prs-650 / prs-350 /kindle 3
need regex help search and replace

hy,
i want to ask if someone can help me with a "maybe simple" regex.

sample:
Gwin hatte ihn noch nie<br>
gesehen.<br>
»Ich weiß nicht...«<br>

before every <br> is a linebreak, so it shows not good in epub version.

how can i eleminate the linebreake and <br> if the line counts overall <20 including whitespace?

my first test to get it:

<br>\n(?=.{0,20}<br>)

now it get the lb and <br> bevor the short text and put it together.
how can i insert a whitespace between.

the sample above shows like:

Gwin hatte ihn noch niegesehen.<br> instead of:

Gwin hatte ihn noch nie gesehen.<br>



thanks for your help to a newbie

olaf
schuster is offline   Reply With Quote