Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-07-2017, 01:56 PM   #1
skb
Evangelist
skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.
 
skb's Avatar
 
Posts: 401
Karma: 1597305
Join Date: Mar 2010
Device: Ipod G4, MacOS 10.12, Calibre, Pocketbook Touch HD 3
Find and replace across line breaks

Trying to clean up some ebooks that break in my reader*.

How do I search and replace for something like this in the HTML?

Code:
<br class="calibre4" />
  <br class="calibre4" />
That is, two tags that appear across line breaks.

thanks!



* I know two BR tags will effectively give me a paragraph break (I've fixed the real bits in the files that was borking the ebook) but it offends the OCD HTML tidy-er-upper that I used to be in my old job.
skb is offline   Reply With Quote
Old 02-07-2017, 02:32 PM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by skb View Post
How do I search and replace for something like this in the HTML?

Code:
<br class="calibre4" />
  <br class="calibre4" />
That is, two tags that appear across line breaks.
A regex like this would work:

Search: <br[^>]+>\s+<br[^>]+>
Replace: </p> <p> (or whatever you want)
Tex2002ans is offline   Reply With Quote
Advert
Old 02-07-2017, 04:08 PM   #3
skb
Evangelist
skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.
 
skb's Avatar
 
Posts: 401
Karma: 1597305
Join Date: Mar 2010
Device: Ipod G4, MacOS 10.12, Calibre, Pocketbook Touch HD 3
Thank you!
skb is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex Help: Find page number & Replace+Remove 2x Line Breaks in Sigil Contre-jour Sigil 9 02-01-2013 10:47 AM
Line breaks on Kindle, no line breaks on 4 PC Siavahda Kindle Formats 0 10-20-2012 05:50 AM
Find/Replace Won't Find Rand Brittain Sigil 7 09-24-2011 04:35 AM
Find/Replace bogus line breaks in Text editor, w/Regular Expression scubaddictions Conversion 15 07-21-2011 08:52 AM
No line breaks ecpepper Amazon Kindle 3 08-09-2009 06:42 PM


All times are GMT -4. The time now is 04:16 PM.


MobileRead.com is a privately owned, operated and funded community.