Hi... Michael Olson <[EMAIL PROTECTED]> writes:
> Jim Crossley <[EMAIL PROTECTED]> writes: > >> John Sullivan <[EMAIL PROTECTED]> writes: >> >>> Jim Crossley <[EMAIL PROTECTED]> writes: >>> >>>> Is there some way I can apply a regexp to replace those "pos" tags >>>> with HTML anchors in the output? > > Adding this to your .emacs might work. > > (defun planner-resolve-position-url (id) > (save-match-data > (when (string-match "^pos://\\(.+\\)/\\([^/]+\\)#\\([0-9]+\\)" id) > (concat "http://myurl.com/depot/" (match-string 2 id) > "#" (match-string 3 id))))) You da man! I had to tweak it a bit, though... (defun planner-resolve-position-url (id) (save-match-data (when (string-match "^pos:///home/jim\\(/depot.+\\)%23\\([0-9]+\\)" id) (concat "http://myurl.com/" (match-string 1 id) "?ac=22")))) It seems the id comes in "url encoded", so I had to replace the '#' with %23 to achieve a match. The rest of the gunk (ac=22) is specific to p4web. Thanks again! Jim _______________________________________________ emacs-wiki-discuss mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
