Richie Hindle <[EMAIL PROTECTED]> writes:
> [Fredrik]
>> so re.sub("([_.])\\1+", "\\1", newname) replaces runs consisting
>> of either a . or an _ followed by one or more copies of itself, with
>> a single instance of itself.
>
> ...and this:
>
>>>> def isprime(n):
>>>> return n > 1 and not re.match(r'(xx+)\1+$', 'x'*n)
>
> finds prime numbers.So, who will post a 'Pior' (Python in one regex)? Thomas -- http://mail.python.org/mailman/listinfo/python-list
