[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: |
Tue, 08 Dec 2009 14:55:33 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20081227) |
Peter Dyballa wrote:
>
> Am 08.12.2009 um 11:50 schrieb Andreas Röhler:
>
>> Barry Margolin wrote:
>>> In article <mailman.12469.1260221021.2239.help-gnu-emacs@gnu.org>,
>>> Matthew Dempsky matthew dempsky wrote:
>>>
>>> Here's another example of a limit case:
>>>
>>> (string-match "a*" "b") returns 0, because a* matches zero or more a's,
>>> and there are zero a's at position 0.
>>>
>>
>> Hmm, interesting
>>
>> IMHO that differs:
>>
>> (string-match "a*" "b") asks for a non-occurrence too. So "0" of first
>> position is plausible.
>
>
> Aren't the regular expressions "" and "a*" equivalent in that respect
> that they both also match the empty string?
>
...
Ah, see some point now. If I take the "a", nothing is left...
OTOH if (string-match "a*" "b") returns NIL, will that be less plausible?
Not sure... However, see current behavior conforms to POSIX
http://www.opengroup.org/onlinepubs/009695399/
So I'll simply keep it in mind, hopefully...
Thanks all again
Andreas
- Re: string-match bug?, (continued)
- 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, 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 <=
- 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, 2009/12/09
- 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