help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: string-match bug?


From: Frank Fredstone
Subject: Re: string-match bug?
Date: Thu, 10 Dec 2009 12:40:53 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Andreas Röhler <address@hidden> writes:

> Frank Fredstone wrote:
>> Andreas Röhler <address@hidden> writes:
>> 
>>> Aren't
>>>
>>> (string-match "" "a")
>>>
>>> and
>>>
>>> (string-match "" "")
>>>
>>> different cases in some perspective?
>> 
>> You can think of it like this:
>> 
>> If you line up 3 boxes left to right, where among them are there no
>> boxes? There are no boxes before the first, between the first and the
>> second, between the second and the third and after the last. The first
>> place (position left to right) where there are no boxes, is before the
>> first (position 0).
>> 
>> 
>
> well, isn't the first 0?
> before the first would be -1 then?

Before the first, would be -1, if there were a box there. But, we're
talking about where no boxes are. There is no box before the first, at
position 0.



reply via email to

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