Python vs. Perl, which is better to learn?
Fredrik Lundh
fredrik at pythonware.com
Wed May 1 06:09:02 EDT 2002
James J. Besemer wrote:
> The basic regex operators are similar to Python's, though Perl
> adds some extras such as
>
> {n,m} # preceeding pattern matches at least n but no more than m times
how is that different from Python's
{m,n}
Causes the resulting RE to match from m to n repetitions
of the preceding RE, attempting to match as many repetitions
as possible. For example, a{3,5} will match from 3 to 5 "a"
characters.
(see http://www.python.org/doc/current/lib/re-syntax.html)
</F>
More information about the Python-list
mailing list