From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?windows-1252?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: string-match bug? Date: Tue, 08 Dec 2009 14:55:33 +0100 Message-ID: <4B1E5AD5.5000803@easy-emacs.de> References: <4b1d1a48$0$278$14726298@news.sunsite.dk> <4b1d1e3d$0$276$14726298@news.sunsite.dk> <4B1D6773.3000509@easy-emacs.de> <4B1E2F7D.7060607@easy-emacs.de> <21FFF972-3740-407A-B877-0A928E4037B6@Web.DE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1260281435 32284 80.91.229.12 (8 Dec 2009 14:10:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Dec 2009 14:10:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 08 15:10:28 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NI0li-000281-Qx for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Dec 2009 15:10:28 +0100 Original-Received: from localhost ([127.0.0.1]:34756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NI0lh-0001PO-49 for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Dec 2009 09:10:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NI0Xi-0006hf-VS for help-gnu-emacs@gnu.org; Tue, 08 Dec 2009 08:55:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NI0Xc-0006Xh-Gt for help-gnu-emacs@gnu.org; Tue, 08 Dec 2009 08:55:53 -0500 Original-Received: from [199.232.76.173] (port=52141 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NI0Xc-0006XU-CR for help-gnu-emacs@gnu.org; Tue, 08 Dec 2009 08:55:48 -0500 Original-Received: from moutng.kundenserver.de ([212.227.17.10]:58963) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NI0Xb-00013c-4G for help-gnu-emacs@gnu.org; Tue, 08 Dec 2009 08:55:47 -0500 Original-Received: from [192.168.178.27] (p54BE808E.dip0.t-ipconnect.de [84.190.128.142]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0M7VWZ-1O35FA247b-00x8mK; Tue, 08 Dec 2009 14:55:43 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: <21FFF972-3740-407A-B877-0A928E4037B6@Web.DE> X-Provags-ID: V01U2FsdGVkX1/1WZ3e0gw2ZnSGjgLOcsaZe1B992n2JuJibxm 6oYRNUb0vuxQnZ9mQ5Je5V/SnjPD0d+M3ujUOkHXze8iSKryr+ zAj6pzeC5xsi4C4MctZbpI60gjv8AL/UxnZnsXJVNM= X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70500 Archived-At: Peter Dyballa wrote: > > Am 08.12.2009 um 11:50 schrieb Andreas Röhler: > >> Barry Margolin wrote: >>> In article , >>> 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