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

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

Re: Query replace regex with 2 alternatives


From: Tassilo Horn
Subject: Re: Query replace regex with 2 alternatives
Date: Fri, 07 Dec 2012 21:19:00 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Dan Espen <despen@verizon.net> writes:

>> Or maybe this is what you mean:
>>
>> &lt;\|&gt;
>> Replace with:
>> \,(if (string-equal \& "&lt;" "[" "]"))
>
> This is what I was asking for.
> I pasted both values into emacs and the latter part gave me an
> error, (wrong-number-of-arguments if 1).

A paren is wrong.  It has to be

  \,(if (string-equal \&) "&lt;" "[" "]")

Bye,
Tassilo




reply via email to

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