View Single Post
Old 11-14-2019, 06:12 AM   #3
EbookMakers
Enthusiast
EbookMakers began at the beginning.
 
Posts: 26
Karma: 38
Join Date: Nov 2019
Location: Paris, France
Device: none
The code is rather long, but I can give some crucial points :
I extract the editor text with
Code:
data=current_container.raw_data(file, decode=True, normalize_to_nfc=True)
Then apply the search on it :
Code:
pattern = regex.compile(unicode(search['find']), flags)
match = pattern.search(data)
I have no error, except if I replace ‘ or \u2018 with \xE2\x80\x98
Tell me if you want more.
EbookMakers is offline   Reply With Quote