View Single Post
Old 06-29-2018, 02:36 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,960
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by soucedz View Post
Hey guys, i need help (since i don't know anything about Pyhton or RegEx functions) with creating a function that eliminates the unnecessary paragraphs that occur when converting PDFs to EPUB.
i have tried using Find&Replace with a simple expression like:

</p> <p class="calibre2">[a-z]

since correct paragraphs are succeeded with a capital letter, but the problem is that i don't want it to select the matched lower case letter, i tried something like:

</p> <p class="calibre2">?([a-z])

But the matched lower case letter still gets selected.

Thanks in advance.
I've used a regex similar to your second example with the replacement string being " \1" (a space followed by whatever lower case letter was selected in the search).
DNSB is offline   Reply With Quote