Thread: Regex examples
View Single Post
Old 02-02-2013, 09:55 AM   #188
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
I take it you're extracting, using a proper re-name util, then re-packing.
Search : (.*pg)\d{1,3}(\.jpg)
(stores all upto (and including) 'pg', discard the next digits, store extension)
Replace \1<whatever inserts counter>\2
so if ? is a number counter char \1???\2
(or depending on regex you'd need $ instead of \ for group replacement.

Last edited by Perkin; 02-02-2013 at 09:57 AM.
Perkin is offline   Reply With Quote