Quote:
Originally Posted by 1v4n0
Thank you. And what would the regex be? (just so I don't have to wade through the whole user manual  )
|
In the Calibre Editor, press CTRL+F, select the regex function mode, click Create/edit, paste the following code into the editor,
Code:
def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs):
return str(len(match.group()))
give the function a name, e.g.
CharLen and enter
(A+) as the search expression.
If your text contains
AAA and
AAAA, they should be replaced with 3 and 4.