Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!bbn!rochester!pt.cs.cmu.edu!sei!maa
From: maa@sei.cmu.edu (Mark Ardis)
Newsgroups: comp.emacs
Subject: Re: Function needed: is point within regexp?
Message-ID: <6156@aw.sei.cmu.edu>
Date: 8 Jul 88 13:46:09 GMT
References: <8807070659.AA07832@blueberry.inria.fr>
Organization: Carnegie-Mellon University (Software Engineering Institute), Pgh, PA
Lines: 12
In-reply-to: shapiro@inria.inria.fr's message of 7 Jul 88 11:15:39 GMT

The posted solution will not always work.  Consider the regular
expression "a.b" and sample string "aabb".  If point is initially
located between the two "b"s, then the function posted will return an
error.  The bug is that point is advanced to the *end* of each match
after trying to match, rather than advancing one character.

Mark A. Ardis
Software Engineering Institute
Carnegie-Mellon University
Pittsburgh, PA 15213
(412) 268-7636
maa@sei.cmu.edu