Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ll-xn!husc6!mit-eddie!UKANVAX.BITNET!huxtable
From: huxtable@UKANVAX.BITNET (John L. Huxtable)
Newsgroups: comp.emacs
Subject: RE: Is point in regexp -- My earlier mail went astray.
Message-ID: <8807150243.AA08225@EDDIE.MIT.EDU>
Date: 15 Jul 88 02:59:30 GMT
Sender: daemon@eddie.MIT.EDU
Lines: 23

From:   KUHUB::HUXTABLE     "John L. Huxtable" 14-JUL-1988 08:52
To:     NET%"mcvax!inria.inria.fr!shapiro@UUNET.UU.NET",HUXTABLE
Subj:   RE: Function needed: is point within regexp?

> Date:         Thu, 7 Jul 88 08:59:22 +0200
> From:         Marc Shapiro 
> Subject:      Function needed: is point within regexp?
>
> I am hacking a new, much-improved bibtex-mode for GNU Emacs.  For
> this, I need a function which checks if point is *within* a certain
> regular expression.

Yes, there is a better way.  The functions (match-beginning COUNT)
and (match-end COUNT) return the positions matched by the beginning and
end of the last regexp searched for.  The arg COUNT should be 0 to match
the entire regexp, 1 to match the text matched by \1, etc.  This exists
in EMACS 18.50.  I don't know the earliest version it came with.

Yours,
  John L. Huxtable
  Computing Services
  The University of Kansas
  huxtable@kuhub.cc.ukans.edu
  huxtable@ukanvax.bitnet