Thread: Regex examples
View Single Post
Old 03-08-2014, 07:07 AM   #312
John Doe
Junior Member
John Doe began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2014
Device: Android
Find and replace text but leaving some text behind

I hope this question hasn't been asked before, but here goes:

I want to make epub3 files. With notes (epub:type="noteref" and so on.)

I do know how to make the files, but it isn't automated in Sigil, sadly!

But when I make the files and create the links, Sigil makes this:

Code:
<a href="#id1">This text will have a link to a note</a>

<a id="id1">This will be the note </a>
I want to find all the
Code:
<a href="id***">
(where the id has different numbers), and replace them with
Code:
<a epub:type="noteref" href="#id***" xmlns:epub="http://www.idpf.org/2007/ops">
where I can replace the old code with new code leaving the ID numbers back.

Is that possible?
John Doe is offline   Reply With Quote