From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Malte Spiess Newsgroups: gmane.emacs.help Subject: Re: query-replace-regexp ... "Invalid repacement string '\.'" Date: Mon, 25 Sep 2006 08:33:32 +0200 Organization: Arcor Message-ID: <87hcyw78w3.fsf@trick.ulm.malte.spiess> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1159166449 6654 80.91.229.2 (25 Sep 2006 06:40:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Sep 2006 06:40:49 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 25 08:40:44 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GRk8t-0003Fc-7r for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Sep 2006 08:40:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GRk8s-00008t-Eu for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Sep 2006 02:40:38 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:h8xcFVW9+VFFZbsfVZNMuLf8/Lg= Original-Lines: 24 Original-NNTP-Posting-Date: 25 Sep 2006 08:33:26 CEST Original-NNTP-Posting-Host: 0d554b2b.newsspool4.arcor-online.net Original-X-Trace: DXC=nFMQ9Yc9E9PI?44J>Z[:RQ4IUK\BH3YR106[HdF966[jQd8 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:37600 Archived-At: "s. keeling" writes: > Hi. I was trying to make it easy on myself using q-r-r replacing > '[^\]\.' (not a backslash, followed by a literal dot/period) with the > string (sans quotes) '\.', essentially "escaping" every dot/period in > the file. "M-x query-replace" had no trouble with it but M-x > query-replace-regexp refused, spouting the error message in the > subject. In a regexp for a "\" you need to escape, so write "\\". "\]" is a mistake. A correct regexp for your intention should be '[^\\]\.' -- > So how do you replace '.' with '\.' in emacs? That should be fine. > Suggestions or pointers welcome. Thanks. HTH Malte