View Single Post
Old 06-13-2015, 01:59 AM   #2
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
Search (selected files):
(<p>chapter )\d+

Regex-Function:
Code:
def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs):
    num=number
    return match.group(1)+str(num)
replace.file_order = 'spine'
And:
Replace all.

Useful link:
http://manual.calibre-ebook.com/function_mode.html

Last edited by kovidgoyal; 06-13-2015 at 02:07 AM.
jbacelar is offline   Reply With Quote