python-re: How do I match an alpha character
问题 How can I match an alpha character with a regular expression. I want a character that is in \\w but is not in \\d . I want it unicode compatible that\'s why I cannot use [a-zA-Z] . 回答1: Your first two sentences contradict each other. "in \w but is not in \d " includes underscore. I'm assuming from your third sentence that you don't want underscore. Using a Venn diagram on the back of an envelope helps. Let's look at what we DON'T want: (1) characters that are not matched by \w (i.e. don't