Matt Price <mopto...@gmail.com> writes: > thanks nicolas. If you happen to have a moment, I'm having trouble > reproducing this regexp in elisp. I would think that, even if I can't > figure out how to construct a single regex that matches all the > characters I want to remove, omething like this ought to work: > ------- > (defun matt-org-export-filter-timestamp-function (timestamp backend info) > "removes relevant brackets from a timestamp" > (when (org-export-derived-backend-p backend 'html) > ;; unfortunatley I can't make emacs regexps work yet. sigh. > (replace-regexp-in-string "[][]" "" timestamp) > ;; (replace-regexp-in-string "<" "" timestamp) > )) > -------------- > but the second (commented-out) regexp seems to break my export.
The following should work: (defun matt-org-export-filter-timestamp-function (timestamp backend info) "removes relevant brackets from a timestamp" (when (org-export-derived-backend-p backend 'html) (replace-regexp-in-string "&[lg]t;\\|[][]" "" timestamp))) (add-to-list 'org-export-filter-timestamp-functions 'matt-org-export-filter-timestamp-function) Regards, -- Nicolas Goaziou