re.findall() is skipping matching characters

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


"Skip Montanaro" <skip at pobox.com> 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
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, 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)

NAME
       perlre - Perl regular expressions

DESCRIPTION
       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!

regards
 Steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list