Try Mx query-replace-regexp with "<\([^>]+\)>" as the search string and "<\,(downcase \1)>" as the replacement.
This should work for Emacs 22 and later, see this Steve Yegge blog post for more details on how Lisp expressions can be used in a replacement string.
For earlier versions of Emacs, you can try something like this:
(defun tags-to-lower-case () (interactive) (save-excursion (goto-char (point-min)) (while (re-search-forward "<[^>]+>" nil t) (replace-match (downcase (match-string 0)) t))))
Luke Girvin Mar 24 '09 at 11:38 2009-03-24 11:38
source share