gnu.emacs.help
[Top] [All Lists]

Re: force upper case of matched regex text pattern

Subject: Re: force upper case of matched regex text pattern
From: Andreas RÃhler
Date: Thu, 13 Mar 2008 09:53:25 +0100
Newsgroups: gnu.emacs.help

Am Donnerstag, 13. MÃrz 2008 04:12 schrieb xahlee@xxxxxxxxx:
> (defun upcase-matched ()
> Â "Returns the upcase of matched text."
> Â (let (m1 returnText)
> Â Â (setq m1 (upcase (buffer-substring (match-beginning 1) (match-end
> 1))))
> Â Â (setq returnText (concat "<p>" m1 ))
> Â Â returnText
> Â )
> )
> 


Maybe I miss your point:

you should be able to write something like

(concat "<p>" (upcase obj))

where obj is `match-string'


Andreas RÃhler



<Prev in Thread] Current Thread [Next in Thread>