help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: force upper case of matched regex text pattern


From: Xah
Subject: Re: force upper case of matched regex text pattern
Date: Thu, 13 Mar 2008 04:03:54 -0700 (PDT)
User-agent: G2/1.0

Xah wrote:
 (buffer-substring (match-beginning 1) (match-end 1))

Andreas Röhler wrote:
 (match-string 1)

Thanks. That's much simpler.

  Xah
  xah@xahlee.org
∑ http://xahlee.org/

☄


On Mar 13, 1:53 am, Andreas Röhler <andreas.roeh...@online.de> wrote:
> Am Donnerstag, 13. März 2008 04:12 schrieb xah...@gmail.com:
>
> > (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]