regular expressions and internationalization (WAS: permuting letters...)

Dieter Maurer dieter at handshake.de
Wed Nov 17 14:34:42 EST 2004


Steven Bethard <steven.bethard at gmail.com> writes on Fri, 12 Nov 2004 20:15:28 +0000 (UTC):
> ...
> Is there any way to match \w but not \d?

It is:  r'(?!\d)\w'

The '(?!...)' is called a negative lookahead.



More information about the Python-list mailing list