Thread: Regex examples
View Single Post
Old 09-08-2013, 06:19 AM   #284
BobC
Guru
BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.
 
Posts: 691
Karma: 3026110
Join Date: Dec 2008
Location: Lancashire, U.K.
Device: BeBook 1, BeBook Pure, Kobo Glo, (and HD),Energy Sistem EReader Pro +
Question Regex Arithmetic

I am looking to do some mass-renumbering of ID's in a book in order to insert endnote hyperlinks.

What I want to do is transform something like:

"id012345" .... "id012444"
to
"ref_1" .... "ref_100"

Significant here is that the last digit of the transformed number is not the same as that of the original. (It would actually be the footnote number extracted from the main text where it appears as [1] ... [100] )

Has anyone found a way to do this with Sigil's regex ?

BobC
BobC is offline   Reply With Quote