Match any unicode letter?
问题 In .net you can use \\p{L} to match any letter, how can I do the same in Python? Namely, I want to match any uppercase, lowercase, and accented letters. 回答1: Python's re module doesn't support Unicode properties yet. But you can compile your regex using the re.UNICODE flag, and then the character class shorthand \w will match Unicode letters, too. Since \w will also match digits, you need to then subtract those from your character class, along with the underscore: [^\W\d_] will match any