View Single Post
Old 05-14-2019, 03:05 PM   #7
siebert
Developer
siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.
 
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
I don't think I ever used unicode in regular expressions. Did you just copy my code or did you try to replace the „“ chars in it with the ones copied from the source webpage?

Otherwise this variant might work better:

Code:
preprocess_regexps = [
   (re.compile(r'„|“'),
    lambda match: '"'),
]
Or you could post the whole recipe here, so I can test it.
siebert is offline   Reply With Quote