From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: exits funnel Newsgroups: gmane.emacs.help Subject: Trouble with regexp Date: Tue, 25 Oct 2005 09:24:40 -0700 (PDT) Message-ID: <20051025162440.9265.qmail@web33910.mail.mud.yahoo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1130259176 6321 80.91.229.2 (25 Oct 2005 16:52:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Oct 2005 16:52:56 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 25 18:52:54 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EUS2P-00016K-KP for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Oct 2005 18:52:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUS2P-0001Pg-47 for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Oct 2005 12:52:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EURbP-0007S6-OU for help-gnu-emacs@gnu.org; Tue, 25 Oct 2005 12:24:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EURbN-0007RB-VJ for help-gnu-emacs@gnu.org; Tue, 25 Oct 2005 12:24:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EURbN-0007R5-RN for help-gnu-emacs@gnu.org; Tue, 25 Oct 2005 12:24:41 -0400 Original-Received: from [66.163.178.74] (helo=web33910.mail.mud.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1EURbN-0006Pg-Pq for help-gnu-emacs@gnu.org; Tue, 25 Oct 2005 12:24:41 -0400 Original-Received: (qmail 9267 invoked by uid 60001); 25 Oct 2005 16:24:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=liU59KzMZ0YHXES2mNESsbEXndnCoLquFMuGQ7jt0cba0aJ5dEcMgFfJH+OHzDCHxkaQZFJUE+u8Hp/uHnjvEo1eE84mNL4NvPxgQ06TMiAqDyJqQIpOlGOOkPeuTVewp8b2R0I2yJpSKqlH3L7vddXoUAaPYO1nYnpkKkhErt0= ; Original-Received: from [204.249.220.103] by web33910.mail.mud.yahoo.com via HTTP; Tue, 25 Oct 2005 09:24:40 PDT Original-To: help-gnu-emacs@gnu.org 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:30555 Archived-At: Hello, I have a text file with hundres of lines of the form: %token FOO_Alter where 'FOO' is always 'FOO' but 'Alter' is variable. I'd like to convert these lines to: t_foo_Alter = 'Alter'; using query-replace-regexp but I can't quite get it right. Here's what I have so far: M-x query-replace-regexp RET %token XTAG_\(a-Z\) RET t_xtag_\1 = '\1'; RET Sadly, I get 0 occurences replaced. Can anyone set me straight? Thanks in advance. -exits __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com