pythonregexunicode

How do I specify a range of unicode characters in a regular-expression in python?


I am trying to match a range of Unicode characters and I am wondering how to do it. I can match simple ranges like [a-zA-Z] but how do I specify a range of Unicode characters. I've tried

[#xD8-#xF6]

without any luck. Any ideas?


Solution

  • Try:

    [\u00D8-\u00F6]