[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string-match bug?
From: |
Andreas Röhler |
Subject: |
Re: string-match bug? |
Date: |
Mon, 07 Dec 2009 21:37:07 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20081227) |
Colin S. Miller wrote:
> Colin S. Miller wrote:
>>
>> If you want to check if "foo" IS the empty string then do
>> (string-match "^$" "foo")
>>
> Or, of course, use (equal "" "foo").
> Don't use (eq ...), it checks if the string-object
> is the same, not that they have the same value.
>
>
Hi,
thanks for your answer. Let me pose the question again:
string-match asks, if a regexp is contained by string.
(equal "" "foo") reads a quite different question for me, as (string-match "^$"
"foo") does.
Why should questioned string respond here it contains an empty string at
position 0?
Makes no sense for me.
Andreas
- string-match bug?, Andreas Roehler, 2009/12/07
- Re: string-match bug?, Colin S. Miller, 2009/12/07
- Re: string-match bug?, Colin S. Miller, 2009/12/07
- Re: string-match bug?,
Andreas Röhler <=
- Re: string-match bug?, Matthew Dempsky, 2009/12/07
- Re: string-match bug?, Andreas Röhler, 2009/12/08
- Re: string-match bug?, Juanma Barranquero, 2009/12/08
- Re: string-match bug?, Peter Münster, 2009/12/08
- Message not available
- Re: string-match bug?, Stefan Monnier, 2009/12/08
- Message not available
- Re: string-match bug?, David Kastrup, 2009/12/14
- Message not available
- Re: string-match bug?, Barry Margolin, 2009/12/07
- Re: string-match bug?, Andreas Röhler, 2009/12/08
- Re: string-match bug?, Peter Dyballa, 2009/12/08
- Re: string-match bug?, Andreas Röhler, 2009/12/08