Last change: Feb 9 2004 AD
C-q C-j.RegExp: \W"\(.\|^J\)*?" (\W matches
non-word-constituent)
Ex: "txt" => „txt“: replace \(\W\)"\(\(.\|^J\)*?\)"
by \1„\2“
Define a function to perform the search (&replace). Thus the RegExp becomes a string and any '\' must be doubled: '\\'.
Search for <TAG(whatever including newline, not gready)</(the same TAG)>
(defun replace-html-tag ()
(while (re-search-forward "\\(<\\(TAG\\)\\(.\\|\n\\)*?</\\2>\\)" nil t) (replace-match "X\\&X" t nil)))
Jakub Holư 2004 AD