data regex match

Fredrik Lundh fredrik at
Tue May 2 23:34:26 CEST 2006

Heiko Wundram wrote:

> As always, use a raw string for regular expressions. \d is being interpreted
> to mean an ascii character, and not to mean the character class you're trying
> to reference here.

\d isn't an ASCII character, but \1 is.

>>> print '(\d{2})/\1/\1\1'


More information about the Python-list mailing list