Regex: Matching characters, but not digits
Greg Chapman
glc at well.com
Tue Nov 5 11:32:07 EST 2002
On Tue, 05 Nov 2002 13:06:23 +0100, Thomas Guettler
<zopestoller at thomas-guettler.de> wrote:
>Hi!
>
>\w matches characters and digits. But,
>how can I match only characters?
>
>This should work for unicode, too
>
> thomas
This should work: [^\W\d_]. That is, match something which is 1) not not a \w,
2) not a digit and 3) not an underscore.
---
Greg Chapman
More information about the Python-list
mailing list