From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: silly regexp-replace question: how to delete empty lines Date: Thu, 4 Mar 2004 10:10:35 +0000 Organization: muc.de e.V. -- private internet access Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1078671685 7218 80.91.224.253 (7 Mar 2004 15:01:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Mar 2004 15:01:25 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 07 16:01:15 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AzzmF-0004T2-00 for ; Sun, 07 Mar 2004 16:01:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Azzko-0007IT-1x for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Mar 2004 09:59:46 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!news.ks.uiuc.edu!news.glorb.com!newsfeed.stueberl.de!news.space.net!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1078407748 57772 193.149.49.134 (4 Mar 2004 13:42:28 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 4 Mar 2004 13:42:28 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:121462 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17444 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17444 Johan Bockgård wrote on Thu, 04 Mar 2004 02:31:27 +0100: > "leo" writes: >> now i recall: i guess, the fact that "^[C-j]" works but "^$[C-j]" >> doesn't, is kind of a regexp bug/feature in emacs, isn't it? > For historical compatibility reasons, `$' can be used only at the > end of the regular expression, or before `\)' or `\|'. > For historical compatibility reasons, `^' can be used only at the > beginning of the regular expression, or after `\(' or `\|'. > (info "(elisp)Regexp Special") Yes, it's a pain in the backside. But leo could write his regexp thus: "^\\($\\)[C-j]". > -- > Johan Bockgård -- Alan Mackenzie (Munich, Germany) Email: aacm@muuc.dee; to decode, wherever there is a repeated letter (like "aa"), remove half of them (leaving, say, "a").