View Single Post
Old 12-22-2010, 06:13 PM   #16
tscamera
Enthusiast
tscamera began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Dec 2010
Device: PRS-650 ... ipad
Exclamation unwanted linebreaks

Quote:
Originally Posted by kiwidude
I've done this a lot to "repair" the results of PDF conversions.

What you want to do is something like this:
Find: ([a-z])</p>\s+<p class="calibre2">
Replace: \1
In the replace expression, it is \1 followed by a single space.

That will find any sentences ending with a lowercase a-z and strip the paragraph end/beginning and replace with that same last character with an additional space. Putting the () brackets around the expression in the Find puts it into a group which you then access in the replace with \1
uups!

if you are living in ne countries, cleaning up text in your own language...
don't forget to put additional chars - words may ending with it , in the formula!!!
i.e. german (ß)

([a-zß])</p>\s+<p class="calibre2">

but if you understood what happens here, you know already.
don't you?
tscamera is offline   Reply With Quote