[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: |
Wed, 09 Dec 2009 09:05:12 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20081227) |
Matthew Dempsky wrote:
> On Tue, Dec 8, 2009 at 12:48 PM, Barry Margolin <barmar@alum.mit.edu> wrote:
>> If
>> (string-match (concat regex1 regex2) (concat str1 str2))
>> then
>> (and (string-match regex1 str1) (string-match regex2 str2))
>
> Not quite: STRING-MATCH searches for a substring that matches a
> specified regexp; it doesn't return whether the whole string matches
> the regexp.
>
>
>
As said, present behavior is POSIX and I don't question that for now.
Nonetheless, returning NIL at the second question looks like a more useful
result -
because taking incertitude.
(string-match "a" "a") => 0
(string-match "" "a") => 0
(string-match "" "") => 0
- Re: string-match bug?, (continued)
- 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
- Re: string-match bug?,
Andreas Röhler <=
- Re: string-match bug?, Juanma Barranquero, 2009/12/09
- Re: string-match bug?, Andreas Röhler, 2009/12/09
- Re: string-match bug?, Matthew Dempsky, 2009/12/09
- Re: string-match bug?, tomas, 2009/12/09
- Re: string-match bug?, Andreas Röhler, 2009/12/09
- Re: string-match bug?, Matthew Dempsky, 2009/12/09
- Message not available
- Re: string-match bug?, Barry Margolin, 2009/12/09
- Re: string-match bug?, tomas, 2009/12/09
- Re: string-match bug?, Kevin Rodgers, 2009/12/09
- Message not available
- Re: string-match bug?, Stefan Monnier, 2009/12/10