View Single Post
Old 05-25-2012, 10:45 PM   #39
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,734
Karma: 206739468
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
Let me make this simple and show you how it's done and how to do it your way easily.

I'll start with chapter headers using <p class="para">Chapter One</p>. We change that to <h2 class="para">Chapter One</h2>. With me so far? Good. Now you've fixed all the chapter titles to be <h2 class="para">chaptertitle</h2> and that's good except you don't want the class there. Now the easy part begins. All you do is search <h2 class="para"> and replace it with <h2>. See, easy. All it takes is one extra simple step and it works and it gets the job done.
That would work fine, I guess... if I wanted to spend all day correcting an ebook with 100+ chapters.

Or I could just search for <p class=.*?>Chapter(.*?)</p> and replace it with <h2>Chapter\1</h2> and call it a day.

Last edited by DiapDealer; 05-25-2012 at 10:53 PM.
DiapDealer is offline   Reply With Quote