Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 04:04 PM   #31
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 401
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by Turtle91 View Post
That’s what I do most of the time (regex)… BUT … you need to be very careful of nested tags especially if you are searching for <span>s because that regex will pickup the first end tag not necessarily the correct one.

As Diap mentioned, his plugin actually parses the html to avoid that issue.
I'm not sure which post you're responding to. Assume it's recent:

I can't recall ever seeing a nested h# tag and Jon's example wasn't nested.

I'm not sure it's even possible to do nested properly with standard regex. I started a post asking about that and so far I've gotten the expected lack of response.

Anyway, agreed.
foosion is offline   Reply With Quote
Old Today, 04:05 PM   #32
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: 39,751
Karma: 154147706
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I'm not certain if the calibre flavour of DiapDealer's tool will handle regex but the Sigil version does. For a <tag>blah blah blah</tag> I will use regex but where nested tags come into play, I will go with TagMechanic. I remember way back (2012, Sigil 0.5.3???) when I looked at the dog's breakfast that I created using a regex search/replace covering nested divs and exited without saving.
DNSB is offline   Reply With Quote
Old Today, 04:07 PM   #33
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,016
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Turtle91 View Post
That’s what I do most of the time (regex)… BUT … you need to be very careful of nested tags especially if you are searching for <span>s because that regex will pickup the first end tag not necessarily the correct one.

As Diap mentioned, his plugin actually parses the html to avoid that issue.
I agree. I use Diap's plugin for divs and spans because it works better then risking regex.
JSWolf is offline   Reply With Quote
Old Today, 04:09 PM   #34
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,016
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
I'm not certain if the calibre flavour of DiapDealer's tool will handle regex but the Sigil version does. For a <tag>blah blah blah</tag> I will use regex but where nested tags come into play, I will go with TagMechanic. I remember way back (2012, Sigil 0.5.3???) when I looked at the dog's breakfast that I created using a regex search/replace covering nested divs and exited without saving.
The calibre version of Diaps Editing Toolbag does allow regex for the search.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
It's Complicated drjenkins Deals and Resources (No Self-Promotion or Affiliate Links) 13 03-06-2014 12:23 AM
I'm sure this would be complicated, but is this possible? Dullahir Calibre 5 06-03-2013 05:04 AM
Now Things Get Complicated Kris777 News 21 04-17-2010 03:25 AM
UK User - is it really this complicated?! twisticles Sony Reader 30 09-22-2008 10:46 PM


All times are GMT -4. The time now is 05:18 PM.


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