View Single Post
Old 05-10-2014, 06:28 AM   #10
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by toothpicz View Post
original code:
Code:
<p class="calibre2"><span class="bold">5.</span></p>
My regex to find:
Code:
<p class="calibre2"><span class="bold">\s*[0-9]+.*?</span></p>
Try:
Code:
<p class="calibre2"><span class="bold">(\s*[0-9]+\..*?)</span></p>
But if the sample is accurate, I would use:
Code:
<p class="calibre2"><span class="bold">(\d+\.)</span></p>
Quote:
My regex to replace:
Code:
<p class="calibre2"><span class="bold"><h3>???</h3></span></p>
The replace is:
Code:
<p class="calibre2"><span class="bold"><h3>\1</h3></span></p>
But, I am pretty sure you can't have a heading within a paragraph. What I would use is:
Code:
<h3 class="calibre2">\1</h3>
I would check that the class "calibre2" didn't remove the bold from the usual heading definition.
davidfor is offline   Reply With Quote