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.
|