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

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

Re: Regexp Query/Replace Without Trashing Original Text


From: Tennis Smith
Subject: Re: Regexp Query/Replace Without Trashing Original Text
Date: Sun, 1 Aug 2004 19:45:00 -0700

Thanks.

-T
"Pascal Bourguignon" <spam@thalassa.informatimago.com> wrote in message
877jsi3gpu.fsf@thalassa.informatimago.com">news:877jsi3gpu.fsf@thalassa.informatimago.com...
> "Tennis Smith" <tennis_smith@yahoo-remove-to-reply.com> writes:
>
> > Hi,
> >
> > How can I convert something like this
> >
> > $GLOBAL_VAR
> >
> > to this:
> >
> > $global_array(GLOBAL_VAR)
> >
> > ??
> >
> > Its easy to do a regexp query/replace for "\$[A-Z]", but I don't really
want
> > to change either the leading dollar sign ("$") or the trailing uppercase
> > text (GLOBAL_VAR).
>
> M-x replace-regexp RET \$\([A-Z][A-Z_]*\) RET $global_array(\1) RET
>
> --
> __Pascal Bourguignon__                     http://www.informatimago.com/
>
> There is no worse tyranny than to force a man to pay for what he does not
> want merely because you think it would be good for him. -- Robert Heinlein




reply via email to

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