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: Yair Friedman
Subject: Re: Regexp Query/Replace Without Trashing Original Text
Date: Mon, 02 Aug 2004 16:56:29 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt)

On Sat, 31 Jul 2004 03:37:48 -0700, 
"Tennis Smith" <address@hidden> 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).

You want to replace "\$\([A-Z_]+\)" with "$global_array(\1)", but as
Kai suggested keyboard macros are more easy most of the time.


reply via email to

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