From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "leo" Newsgroups: gmane.emacs.help Subject: silly regexp-replace question: how to delete empty lines Date: Wed, 3 Mar 2004 12:11:08 +1100 Organization: Netspace Internet Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1078337638 25023 80.91.224.253 (3 Mar 2004 18:13:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Mar 2004 18:13:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 03 19:13:48 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 1AyasO-0006sK-00 for ; Wed, 03 Mar 2004 19:13:48 +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 1Ayari-0005RO-HQ for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Mar 2004 13:13:06 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!info1.fnal.gov!nntp-server.caltech.edu!news.uchicago.edu!news-xfer.newsread.com!newspeer.monmouth.com!news-out.visi.com!petbe.visi.com!news.octanews.net!news1.optus.net.au!optus!news.mel.connect.com.au!news.netspace.net.au!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: dsl-210-15-204-246.nsw.netspace.net.au Original-X-Trace: otis.netspace.net.au 1078276668 63682 210.15.204.246 (3 Mar 2004 01:17:48 GMT) Original-X-Complaints-To: usenet@otis.netspace.net.au Original-NNTP-Posting-Date: Wed, 3 Mar 2004 01:17:48 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Original-Xref: shelby.stanford.edu gnu.emacs.help:121447 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:17407 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17407 hi there in a buffer like text is here and here and here further text is here an the endtext i want to delete the two empty lines by an regexp-replace. so i started with _finding_ the lines. that's easy: "^$" is the regexp. but obviouly (replace-regexp "^$" "ghdfg" nil nil nil) does nothing.;-) SO in order to delete empty lines (i.e. to replace it with "") i have to find the empty line _plus_ the linefeed. so i tried (replace-regexp "^$ " "ghdfg" nil nil nil) where the linefeed was type as C-q C-j. but it doesn't find anything. any idea? thanks, leo