View Single Post
Old 11-25-2020, 09:06 PM   #6
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by max-min View Post
A regex-function should solve your problem. One of the parameter you catch in the function is 'number', which give you the n-th occurrence been processed.
So, if you process your epub file by file (option 'current file' in the search panel), this number will start at 1 for each file and will increase at each occurrence.

Ask the function to return str(number) in place the captured group (\d+)
Other examples of regex-functions will show you how to do this.
Thank you very much for your reply.

This is what I have been hoping for. Unhappily, I am not fluent using functions (even if I did use some basic ones) and if you were kind enough to provide me with something which can deal with incremental numbers in a file, I would be very grateful and happy to adapt it.
roger64 is offline   Reply With Quote