Unicode Regular Expressions in Python
November 12, 2010
I was struggling with some unicode issues in Python. I wanted my app to match Eikanger-Bjørsvik Musikklag
, which contained extended characters.
I was able to achieve this by doing the following:
Regex
Prefixing my regular expression with ur made it into a unicode raw string:
lRegEx = ur'\s*([\w\(\)&\' …