From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: string-match bug? Date: Wed, 09 Dec 2009 09:05:12 +0100 Message-ID: <4B1F5A38.1030703@easy-emacs.de> References: <4b1d1a48$0$278$14726298@news.sunsite.dk> <4b1d1e3d$0$276$14726298@news.sunsite.dk> <4B1D6773.3000509@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1260345961 7259 80.91.229.12 (9 Dec 2009 08:06:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Dec 2009 08:06:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 09 09:05:54 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 1NIHYX-0007k3-7S for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Dec 2009 09:05:53 +0100 Original-Received: from localhost ([127.0.0.1]:50826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIHYX-0003G8-2K for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Dec 2009 03:05:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIHYA-0003EI-0O for help-gnu-emacs@gnu.org; Wed, 09 Dec 2009 03:05:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIHY4-0003Ap-Nz for help-gnu-emacs@gnu.org; Wed, 09 Dec 2009 03:05:29 -0500 Original-Received: from [199.232.76.173] (port=35102 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIHY4-0003Ad-It for help-gnu-emacs@gnu.org; Wed, 09 Dec 2009 03:05:24 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.187]:54062) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIHY3-0000iP-SS for help-gnu-emacs@gnu.org; Wed, 09 Dec 2009 03:05:24 -0500 Original-Received: from [192.168.178.27] (p54BE9183.dip0.t-ipconnect.de [84.190.145.131]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0LuHL9-1OG3mQ0EVj-011KYG; Wed, 09 Dec 2009 09:05:21 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: X-Provags-ID: V01U2FsdGVkX19+PWgEjruWiWw46vPQq1jiRDaRhyhiPElW9ba j8tCXtYynoVSWold/VgvQXac8yTU6xPzT+/+xFg9T5vrbUrzKL QV1ae1nJOt69mChwpeSUGpq4Iuc+r4jngLMmms+h5s= 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:70517 Archived-At: Matthew Dempsky wrote: > On Tue, Dec 8, 2009 at 12:48 PM, Barry Margolin 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