[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string-match bug?
From: |
Peter Münster |
Subject: |
Re: string-match bug? |
Date: |
Tue, 8 Dec 2009 12:50:22 +0100 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
On Tue, Dec 08 2009, Andreas Röhler wrote:
> (string-match "" "fooxyzzybar") asks, if there is an empty string in string.
> If yes, report the starting point of the empty string.
>
> Does string start with an empty string? IMHO not.
Hello Andreas,
IMHO yes. Because the concatenation "" + "f" + "" + "o" + "" + "o" + ""
is the same as "foo".
You are looking for this regexp: (string-match "^$" "foo")
Here you get nil as expected.
Cheers, Peter
--
Contact information: http://pmrb.free.fr/contact/
- 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, 2009/12/07
- 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 <=
- 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
- Message not available
- Re: string-match bug?, Barry Margolin, 2009/12/08
- Re: string-match bug?, Pascal J. Bourguignon, 2009/12/08
- Re: string-match bug?, Stefan Monnier, 2009/12/09
- Re: string-match bug?, Matthew Dempsky, 2009/12/08