"xahlee@xxxxxxxxx" <xahlee@xxxxxxxxx> writes:
> is there a way to force to upper case of a matched regex text pattern?
C-M-% your_regexp RET \,(upcase \num_of_match)
> (i recall having seen it somewhere)
> Currently, what i'm doing is to write my own replacement function that
> change the case like this:
> (defun upcase-matched ()
> "Returns the upcase of matched text."
> (let (m1 returnText)
> (setq m1 (upcase (buffer-substring (match-beginning 1) (match-end
> (setq returnText (concat "<p>" m1 ))
> then use â\,(upcase-matched)â for the replacement text.
C-M-% your_regexp RET \,(upcase <p>\0)
> PS I wrote a tutorial on this
please rewrite it, because as you see, you can refer to (sub)matches in the
\,() environment ;)
> â http://xahlee.org/