Quote:
Originally Posted by DiapDealer
I don't follow you. The href="whatever" bit is part of the 'a' tag. you can't strip the 'a' tags without removing the href. Just try the regex and you'll see exactly what it will remove. There's no need to wonder.
|
ok - lets see. I create a 1 line book in sigil using this previously posted example:
<h1 class="calibre10" id="rw-h1_319849-00001"><a class="calibre7" href="../Text/9780857900135_toc.html">4</a></h1>
now I run your (sigil flavored) regex- you are right - it works !
so can you walk me though HOW it works, please -using the above example
I am impressed that it zaps both eth opening and the closing tag, in a single pass, and without needing a \1 replace anywhere
PS re the concern that I may over-zealously zap too much stuff:
My usual precaution in sigil is to run
count all, to begin with; if that returns a count that matches the number of chapters, then clearly I have no instances outside of chapter headers to worry about & I can run
replace all