Article View: gnu.emacs.bug
Article #1570Re: replace-regexp
From: Stephen Gildea
Date: Tue, 11 Apr 1989 17:38
Date: Tue, 11 Apr 1989 17:38
21 lines
959 bytes
959 bytes
Date: Tue, 11 Apr 89 01:52:42 +0200
From: loic%axis_d@axis.axis.fr
To: axis!bug-gnu-emacs@prep.ai.mit.edu
Subject: replace-regexp
(replace-regexp "^." "" ())
It empties my buffer !
I guess that it removes the character. Then the point is still
at the beginning of the line. So it removes the next one. And
so on.
It should skip to the next new-line. Don't you think so ?
No! There is no reason for such special casing; you're just using the
wrong regexp. Try (replace-regexp "^.\\(.*\\)$" "\\1").
< Stephen
Technical Details
Message-ID:
<8904111741.AA26136@life.ai.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!BBN.COM!gildeaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!BBN.COM!gildea From: gildea@BBN.COM (Stephen Gildea) Newsgroups: gnu.emacs.bug Subject: Re: replace-regexp Message-ID: <8904111741.AA26136@life.ai.mit.edu> Date: 11 Apr 89 17:38:09 GMT Sender: news@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 21