From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Dempsky Newsgroups: gmane.emacs.help Subject: Re: string-match bug? Date: Mon, 7 Dec 2009 13:23:32 -0800 Message-ID: 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: quoted-printable X-Trace: ger.gmane.org 1260224807 17302 80.91.229.12 (7 Dec 2009 22:26:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2009 22:26:47 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?ISO-8859-1?Q?Andreas_R=F6hler?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 07 23:26:40 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 1NHm2O-0005JO-MO for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Dec 2009 23:26:37 +0100 Original-Received: from localhost ([127.0.0.1]:49597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHm2O-0008DM-Is for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Dec 2009 17:26:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHl3T-00007f-KX for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 16:23:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHl3O-0008WD-Ra for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 16:23:39 -0500 Original-Received: from [199.232.76.173] (port=46803 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHl3O-0008W4-L0 for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 16:23:34 -0500 Original-Received: from mail-px0-f190.google.com ([209.85.216.190]:34118) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHl3O-0006Sl-DV for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 16:23:34 -0500 Original-Received: by pxi28 with SMTP id 28so630199pxi.7 for ; Mon, 07 Dec 2009 13:23:32 -0800 (PST) Original-Received: by 10.115.84.8 with SMTP id m8mr1695301wal.144.1260221012279; Mon, 07 Dec 2009 13:23:32 -0800 (PST) In-Reply-To: <4B1D6773.3000509@easy-emacs.de> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:70486 Archived-At: On Mon, Dec 7, 2009 at 12:37 PM, Andreas R=F6hler wrote: > Why should questioned string respond here it contains an empty string at = position 0? > Makes no sense for me. Here's an analogy: (string-match "xyzzy" "fooxyzzybar") returns 3. This is because the first 5 characters starting at position 3 are "xyzzy", the same as the first string parameter. The significance of 5 here is the length of "xyzzy". Similarly, (string-match "" "foo") returns 0. This is because the first 0 characters starting at position are "", the same as the first string parameter.