View Single Post
Old 12-27-2010, 03:13 PM   #6
Danger
Evangelist
Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.
 
Danger's Avatar
 
Posts: 490
Karma: 1665031
Join Date: Nov 2010
Location: Vancouver Island, Nanaimo
Device: K2 (retired), Kobo Touch (passed to the wife), KGlo, Galaxy TabPro
Working on a book this morning and I found after stripping out all the class, style and useless spans/divs I was left once again with broken up sentences like this:
<p>this is</p>
<p>part of a</p>
<p>paragraph.</p>

<p>&nbsp;</p>

So I came up with:
FIND: ([a-z,’”.?!-])</p>\n\n\s\s<p>([a-z,A-Z“-])
REPLACE: \1 \2

\n = new line
\s = white space

All the <p>&nbsp;</p> are ignored and then I just strip them out when all the paragraphs are back together.

Interesting info here
Danger is offline   Reply With Quote