re.findall() is skipping matching characters

Skip Montanaro skip at
Tue Oct 16 02:21:32 CEST 2001

    Fredrik> try using a non-capturing group instead: (?:x) instead of (x)

    Gustaf> Nah, enough of Python peculiarities already. It's hard enough to
    Gustaf> learn regexes without adding a strong Python flavor to it. ;-)

Just to set matters straight, that's not a Python peculiarity.  Python gets
most or all of its regular expression syntax from Perl's implementation.  If
you're on a Unix machine with a reasonable Perl installation, "man perlre"
may be a useful adjunct to other regular expression documentation you might
have handy.

Skip Montanaro (skip at

More information about the Python-list mailing list