|
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:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 |
Or you can still use a regexp, with something like (defun other-looking-back (re limit) (save-restriction (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.
[Prev in Thread] | Current Thread | [Next in Thread] |