View Single Post
Old 09-30-2018, 02:17 AM   #1
Davvy123
Junior Member
Davvy123 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2018
Device: iphone 8 plus
Replacing text in Sigil

Hi, I'm new to Sigil, and just joined Mobileread in order to get some help with editing ebooks and learning how to use Sigil effectively.

My first question is how to use Regular Expressions to edit out or find/replace certain text in an epub. I have seen a Regex tutorial here on these forums, but I'm not very technical, and got lost pretty quickly reading through it. So I'd like to ask if you can help me with an actual problem, once I learn the solution, I think I can work my way back and figure out how to solve my next one on my own.

For example, I have an epub with the following lines:

<p class="calibre2">Hob_0375758275_3p_fm1_r1.qxd 8/30/01 9:35 AM Page iv</p>
<p class="calibre2">Hob_0375758275_3p_fm1_r1.qxd 8/30/01 9:35 AM Page a</p>

There are many other lines like that sprinkled throughout the pub, over several .html pages. Each line has the "Hob_0375758275_3p_fm1_r1.qxd 8/30/01 9:35 AM" string repeated, as well as the tag <p class="calibre2"></p>. And then within the tag there are page numbers, as shown in the above examples, and these change from instance to instance.

I'd like to just get rid of all of these lines of codes. How would I do this? Do I have to work on each .html page, one by one, or can I actually do a bulk find/replace that would span all .html pages and get rid of these lines?

Thanks in advance for your help!
Davvy123 is offline   Reply With Quote