Thread: Regex examples
View Single Post
Old 02-02-2013, 09:06 AM   #187
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
I'm off topic here, as this is about a *.CBR and otherwise has nothing to do with Sigil, but the recent post reminded me I meant to inquire.

I've got a series of images with a page number added at the end, but the existing page numbering is a disaster. Is there a means of stripping any ending numbers (only), without removing numbers from other locations in the filename?

Ultimately I want my output to look like:
Terminator 2 -- ch14 pg023.jpg
With preceding zeros as placeholders to force proper viewing order.

I've tried: [0-9,3] to find the page numbers, but that removes all of the numbers in the example filename shown above.

If I try appending the $, then I get no matches. I know it has to be something I am doing wrong.

Adding page numbers back in is a straight %03d replacement which I've been doing as a second step after stripping the pages (it's a total renumber, nothing can be saved).

PS: My apologies if this message needs to be moved, but I wasn't sure where else it might be more relevant within the forums.
Sabardeyn is offline   Reply With Quote