From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dieter Wilhelm Newsgroups: gmane.emacs.help Subject: Re: case change in replacement text with regex-replace [solved] Date: Mon, 16 Apr 2007 21:50:57 +0200 Organization: The Church of Emacs Message-ID: <873b30xfmm.fsf@debby.local.net> References: <461cc717$0$5074$ba4acef3@news.orange.fr> <4621e0c0$0$5094$ba4acef3@news.orange.fr> <87odlpxmh5.fsf@debby.local.net> <46231e0d$0$25936$ba4acef3@news.orange.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1176753153 18528 80.91.229.12 (16 Apr 2007 19:52:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2007 19:52:33 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Le TeXnicien de Surface Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 16 21:52:27 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HdXFS-0002TM-HV for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Apr 2007 21:52:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdXK6-0000Wd-36 for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Apr 2007 15:57:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HdXJ4-0000B8-1I for help-gnu-emacs@gnu.org; Mon, 16 Apr 2007 15:56:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HdXJ2-0000AG-JK for help-gnu-emacs@gnu.org; Mon, 16 Apr 2007 15:56:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdXJ2-0000A9-0p for help-gnu-emacs@gnu.org; Mon, 16 Apr 2007 15:56:08 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HdXEN-0007IH-DV for help-gnu-emacs@gnu.org; Mon, 16 Apr 2007 15:51:19 -0400 Original-Received: from [84.167.23.2] (helo=debby.local.net) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis), id 0MKwpI-1HdXEK0dyg-00047i; Mon, 16 Apr 2007 21:51:18 +0200 Original-Received: from dieter by debby.local.net with local (Exim 4.63) (envelope-from ) id 1HdXE1-00010C-HK; Mon, 16 Apr 2007 21:50:57 +0200 In-Reply-To: <46231e0d$0$25936$ba4acef3@news.orange.fr> (Le TeXnicien de Surface's message of "Mon\, 16 Apr 2007 08\:56\:12 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-Provags-ID: V01U2FsdGVkX1+4N+hlO86AZVmxGXXJWqTjb26nC9kEw/brZ69 HO4xecWb8jwWUcKHC0knupSlLLKoA4FEmhAh1TjT55RZSOQFEi Wz7yFxdwjKFoV/I1SKUTQdFcMt8D41V X-detected-kernel: Linux 2.6? (barebone, rare!) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42736 Archived-At: Le TeXnicien de Surface writes: > > I succeeded with query-replace-regexp-eval > and the following > (I must say here that the text I work with is in the form =C2=AB c=3D"AB"= =C2=BB > and that I want to obtain =C2=AB c=3D"AB" or c=3D"Ab" or c=3D"aB" or c=3D= "ab" =C2=BB from it) > > Here the searching regexp =C2=AB c=3D"\([A-Z\)\([A-Z]\)" =C2=BB > and here the expression evaluated > > (concat "c=3D\"" (upcase \1) (upcase \2) "\" or c=3D \"" (upcase \1)=20 > (downcase \2) "\" or c=3D \"" (downcase \1) (upcase \2)=20 > "\" or c=3D \"" (downcase \1) (downcase \2) "\"") Great, but I think a macro would have been a good alternative. I would have written this profound message to your private mail address but I'm getting constantly this 8-): texnicien.de.surface@chezmoi.eur SMTP error from remote mail server after RCPT TO:: host authmailonline.kundenserver.de [212.227.15.180]: 550 texnicien.de.surface@chezmoi.eur: no such domain --=20 Best wishes H. Dieter Wilhelm Darmstadt, Germany