View Single Post
Old 04-24-2015, 02:56 PM   #2
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,799
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
There's no incrementing counter function in Sigil's PCRE regex engine. It has to capture the number from the text it matches before it can be inserted into any replace expression. I don't think regex is going to help you here.

You may need to use something like the regex-function feature of calibre's editor to create a custom python routine to create the numbers to add to matched strings.
DiapDealer is online now   Reply With Quote