View Single Post
Old 12-06-2020, 04:56 PM   #25
lidao
Junior Member
lidao began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2020
Device: paperback
Quote:
Originally Posted by Tex2002ans View Post
Hmmmmmm... Well, just to reiterate, you should only use this in personal books, DEFINITELY NOT FOR SALE.



Calibre or Sigil works. They both edit EPUBs + the steps are extremely similar.

Note: MAKE SURE YOU SAVE A BACKUP COPY of your book. Regular expression are very powerful (and can completely break your book if you do them wrong).

* * *

1. Open Calibre.

2. Right-Click the book's title in the list, then press Edit Book.

This will open up Calibre's built-in ebook editor.

3. Press Ctrl+F to pop up the Find/Replace.

4. Below the Find/Replace textboxes, you should see 3 dropdowns and 2 checkboxes:

Mode: [Normal] + [All Text Files] + [Down]
Case Sensitive + Wrap

Change Mode to Regex.

5. Insert this regular expression in the boxes:

Search: (“[^”<]+”)
Replace: <b>\1</b>

6. DO NOT press "Replace All" yet.

Test your Regular Expression on a small set first:

Press "Find" to see if it highlights the correct text.

Press "Replace".

Make sure it does what you want. Then test again.

If it looks like it's working, then you can "Replace All".

Note: If anything goes seriously wrong, you can always Edit > Undo or Edit > Revert. Or as a last resort, go back to your original copy... you did make a backup, didn't you?



No problem.



Sounds like poor writing to me.

But thanks for giving me the use-case.
I JUST tested this out and it works perfectly on a book ive alrdy read! Thank you so much for helping me. And just so you dont get the wrong idea, the books im reading are free to read online (amateur writers).
lidao is offline   Reply With Quote