[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string-match bug?

From: David Kastrup
Subject: Re: string-match bug?
Date: Mon, 14 Dec 2009 14:59:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Andreas Politz <address@hidden> writes:

> address@hidden writes:
>> On Thu, Dec 10, 2009 at 12:34:45AM -0500, Stefan Monnier wrote:
>>> > Actually, it has an infinite number of empty strings at position 0
>>> > -- and at every position.
>>> Good, thank you.  I never took the time to count them, so I always
>>> wondered whether there really were enough of them to count as "an
>>> infinite number".  I'm glad it's settled.
>> Far from it! the more interesting question: countable? /me tries in vain
>> to hide from Cantor's ghost)
>> Regards
> Counting them is easy with the greedy operator.
> (and (string-match "\\(\\)*" "a")
>      (match-end 0))
> This proofs, empty strings don't exist.

Huh?  That does not count them.  It gives their total length at the
first match, but the total length will be zero regardless of the number
of matches.

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]