[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible problem with looking-back function

From: Vinicius Jose Latorre
Subject: Re: Possible problem with looking-back function
Date: Fri, 20 Aug 2010 21:08:34 -0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100701 SeaMonkey/2.0.6

Or you can still use a regexp, with something like

   (defun other-looking-back (re limit)
       (narrow-to-region (point-min) (point))
       (goto-char limit)
       (re-search-forward (concat "\\(?:" re "\\)\\'") nil t)))

Note that it imposes a few different constraints on the regexp, mostly
it can't use things like \>  or \<  or \b at the end because
narrow-to-region will prevent it from peeking at the next char.

Ok, thanks all for helping.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]