View Single Post
Old 10-01-2009, 11:14 PM   #1
Phil_C
Addict
Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.
 
Phil_C's Avatar
 
Posts: 236
Karma: 391602
Join Date: Oct 2009
Location: Chicago, IL USA
Device: Sony PRS-350; Kobo Clara HD; Kobo Clara 2E
Regular Expressions help needed

Hi All --- first post here ---

I've been playing with my Sony Reader for three weeks now and trying to format various books found around the Web. Researching these forums have led me to calibre and Book Designer, both excellent programs.

I'm having a problem cleaning up some .lit files for conversion to .lrf in BD because of page numbers and the breaks caused by them. I have been able to get rid of the numbers by use of simple Regular Expressions (which I had never heard of until now) in Book Cleaner.

But I can't figure out how to deal with the empty spaces and lines left by page breaks after the page numbers are removed. What remains is the broken end of a sentence, two blank lines after that, then the broken sentence continuing on what previously was the next page. So I need to get rid of all the space and make the sentence whole again.

I fixed one book by visually scanning several hundred pages and deleting the offending spaces manually, but don't want to do that again!

This must be a common problem, so I hope someone here can give me a clue. I think I do not understand exactly what is in all that blank space, or how to tell the Reg Exp where to begin and end.

Thanks for any help.

Phil
Phil_C is offline   Reply With Quote