[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with elisp
From: |
Seweryn Kokot |
Subject: |
Re: problem with elisp |
Date: |
Thu, 09 Oct 2008 23:23:37 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Nikolaj Schumacher <me@nschum.de> writes:
> Or you can give up the temp string and search for both at once like this:
>
> (re-search-forward (concat "\\(" (regexp-quote string-a) "\\)\\|\\("
> (regexp-quote string-a) "\\)"))
>
> and then replace based on which one was found:
>
> (if (match-beginning 1)
> (replace-match string-b)
> (replace-match string-a))
I prefer this idea.
Thanks Nikolaj, Joost and Barry for help
--
regards,
Seweryn