[PLUG] emacs: search-and-replace regex

Roderick A. Anderson raanders at acm.org
Sun Dec 29 08:04:03 UTC 2002


On Sat, 28 Dec 2002, Rich Shepard wrote:

>   Yes, Russell, I did look at the very latest FSF manual for emacs 21.2, and
> I didn't find the answer there -- on page 118, to be specific.
> 
>   I have a series of structures named, for example, PDB, RDB, VDB. I want to
> add 'struct' to the references to them in function prototypes. According to
> the emacs docs (ORA, info and FSF ps file), one can do either a search with
> a regex search string or a search-and-replace with the exact text (case
> insensitive or not at the user's option), but not a search-and-replace using
> a regex such as .DB.

Alt-X 
query-replace-regex 
\([PRV]\)DB 
\1DBstruct

I think and if I understand what you're trying to do.  Show me a before 
and after example and I may be able to get it more exact.


Rod
-- 
  "Open Source Software - Sometimes you get more than you paid for..."





More information about the PLUG mailing list