From xemacs-m  Tue Jul 29 23:14:20 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id XAA05817
	for <xemacs-beta@xemacs.org>; Tue, 29 Jul 1997 23:14:17 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.6/8.8.6) id VAA24286;
	Tue, 29 Jul 1997 21:18:14 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: Bug in re-search-backward?
References: <199707291607.SAA19521@daedalus.tnt.uni-hannover.de>
X-Face: `'%\i;ySOu]g?NlziJSk_$&@]KP`}~PEQPjZ5;nxSaDW_o$4+4%Ab]%Ifw3ZR;7TIT3,O,'
 @2{L;]ox6kc;$_5kU'n**9vFg-]eV~GbxSVCx|(s%uR[],*:^WKmC`B}(;|k9/m]gwt?&`t;^rfCJg
 khHH>pP1W\)xM0U@!FNDD72{3fDP$PkBhx^7Z?-WxH6DbFN:QOnT`llzW}VGdYv;n9lzljQvKTIBhQ
 YuV
X-Attribution: sb
From: SL Baur <steve@xemacs.org>
In-Reply-To: Heiko Muenkel's message of "Tue, 29 Jul 1997 18:07:40 +0200"
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Date: 29 Jul 1997 21:18:14 -0700
Message-ID: <m2yb6ptbp5.fsf@altair.xemacs.org>
Lines: 23
X-Mailer: Gnus v5.4.64/XEmacs 20.3(beta16) - "Budapest"

Heiko Muenkel <muenkel@tnt.uni-hannover.de> writes:

> If you've a buffer with the contents
> 	1234
> and you start a regularexpression search from the end with
> 	(re-search-backward "[0-9]+")
> the search will be stopped at the character 4, therefore the
> function call (match-string 0) will only return the string "4".
 ...
> This is propably true for all emacs versions.

Isn't this referred to in the docstring:

re-search-backward: (REGEXP &optional BOUND NO-ERROR COUNT BUFFER)
  -- an interactive built-in function.
Search backward from point for match for regular expression REGEXP.
Set point to the beginning of the match, and return point.
The match found is the one starting last in the buffer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
and yet ending before the origin of the search.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

That makes it a documented feature, I believe.

