[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to apply a list of regex replaces to multiple files?
From: |
michael.l |
Subject: |
Re: How to apply a list of regex replaces to multiple files? |
Date: |
Mon, 30 Jun 2008 22:56:22 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Jun 30, 10:23 pm, David Kastrup <d...@gnu.org> wrote:
> "michael.l" <michael.lom...@gmail.com> writes:
> > I've browsed the messages here and have googled but don't see a clear
> > solution yet. I have about 900 documents to which I need to apply a
> > list of maybe 40 separate regex search and replaces. I would like to
> > feed a list of the regex expressions and replacements to emacs and
> > have it applied to a directory of the files. Any solutions? Keyboard
> > macros don't seem like the right solution....
>
> dired-do-query-replace-regexp is an interactive compiled Lisp function
> in `dired-aux.el'.
>
> It is bound to Q, <menu-bar> <operate> <query-replace>.
>
> (dired-do-query-replace-regexp FROM TO &optional DELIMITED)
>
> Do `query-replace-regexp' of FROM with TO, on all marked files.
> Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
> If you exit (C-g, RET or q), you can resume the query replace
> with the command M-,.
>
> --
> David Kastrup, Kriemhildstr. 15, 44793 Bochum
Thank you David; hadn't come across that yet. Is there a way to input
the entire list of regex replacements rather than doing each from the
minibuffer? And will this mean typing "!" 900 times? I'm just learning
emacs.
- Re: How to apply a list of regex replaces to multiple files?, David Kastrup, 2008/07/01
- Re: How to apply a list of regex replaces to multiple files?,
michael.l <=
- Re: How to apply a list of regex replaces to multiple files?, Tim X, 2008/07/01
- Re: How to apply a list of regex replaces to multiple files?, Phil Carmody, 2008/07/01
- Re: How to apply a list of regex replaces to multiple files?, Lennart Borgman (gmail), 2008/07/01
- Re: How to apply a list of regex replaces to multiple files?, michael.l, 2008/07/01
- Re: How to apply a list of regex replaces to multiple files?, Xah, 2008/07/01