re.findall() is skipping matching characters

Skip Montanaro skip at pobox.com
Mon Oct 15 20:21:32 EDT 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 pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list