re.findall() is skipping matching characters

Steve Holden sholden at
Tue Oct 16 19:53:12 CEST 2001

"Skip Montanaro" <skip at> wrote in ...
>     Fredrik> try using a non-capturing group instead: (?:x) instead of (x)
>     Gustaf> Nah, enough of Python peculiarities already. It's hard enough
>     Gustaf> learn regexes without adding a strong Python flavor to it. ;-)
> Just to set matters straight, that's not a Python peculiarity.  Python
> most or all of its regular expression syntax from Perl's implementation.
> you're on a Unix machine with a reasonable Perl installation, "man perlre"
> may be a useful adjunct to other regular expression documentation you
> have handy.
Skip, are you telling me I'm not allowed to use the re documentation in my
Windows ActivePerl installation? ;-) Or my cygwin Perl, where the exact
command you mention works just fine?


PERLRE(1)        Perl Programmers Reference Guide       PERLRE(1)

       perlre - Perl regular expressions

       This page describes the syntax of regular expressions in
       Perl.  For a description of how to use regular expressions
       in matching operations, plus various examples of the same,
       see discussions of "m//", "s///", "qr//" and "??" in the
       Regexp Quote-Like Operators entry in the perlop manpage.

... etc. ...

Let's not get platform-specific where we don't need to!


More information about the Python-list mailing list