anezih / mobi2stardict

Convert unpacked MOBI dictionaries to StarDict format.
16 stars 2 forks source link

Regex Matching #2

Closed Pahiro closed 3 weeks ago

Pahiro commented 1 year ago

Line 66: body_re = re.search("</idx:orth>(.*?)</idx:entry>", str(e))

This line wasn't getting multiline matches in my HTML. Escaping the / and adding re.S as a search parameter sorted my issue.

body_re = re.search("<\/idx:orth>(.*?)<\/idx:entry>", str(e), re.S)