|
From: | Carsten Dominik |
Subject: | [Orgmode] Re: Regexp problem: org-mode and remind integration |
Date: | Sat, 17 Jan 2009 09:16:11 +0100 |
On Jan 14, 2009, at 3:05 AM, Daniel Martins wrote: Sorry for the confusion, You cannot. The only way is to first find A, then remember your position and look around the match to make sure that the location does not also match the others. For example: (let (tmp-string) (while (re-search-forward "<.*?>" nil t) ;; we have a match of something between angular brackets ;; now grab a string before the beginning of the match (setq tmp-string (buffer-substring (max (point-min) (- (match-beginning 0) 20)) (match-beginning 0))) ;; no check if this string contains DEADLINE of SCHEDULED (when (save-match-data ;; to not loose the info about the original match (and (not (string-match "DEADLINE:") tmp-string) (not (string-match "SCHEDULED:") tmp-string))) ;; ok, this is one of the locations we wanted ...... HTH - Carsten
|
[Prev in Thread] | Current Thread | [Next in Thread] |