View Single Post
Old 03-03-2010, 12:48 PM   #11
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
Quote:
Originally Posted by Valloric View Post
Harry, I don't know what regex flavor you are using, but all the engines that I know of require parentheses for capture groups.

So like this:

Code:
<p>([0-9]*)</p>
And then:

Code:
<h3>\1</h3>
For what Zelda wants, I'd use this:

Code:
<p>(\d+)</p>
With this:

Code:
<h3>\1</h3>
woohoo !! thanks valloric ! that worked perfectly. now when i'm done with all my other corrections i can copy all my html into previous sigil and add in my chapter break divs with a simple find and replace on <h3>. joy.

Quote:
Originally Posted by Valloric View Post
A good regex info site is http://www.regular-expressions.info/, and a great regex test site is Regexr. But do note that Regexr use the Perl notation for backreferences ("$#", e.g "$1", "$2"...) while Sigil uses the sed notation ("\#", e.g. "\1", "\2" ).
and thank you for that, too. i'm sure i'll have plenty of other expressions to find.
zelda_pinwheel is offline   Reply With Quote