home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.emacs:3885 gnu.emacs.help:5204 gnu.epoch.misc:1226
- Path: sparky!uunet!stanford.edu!agate!spool.mu.edu!uwm.edu!rpi!usc!news.bbn.com!news.bbn.com!map
- From: map@BBN.Com (Mike Patton)
- Newsgroups: comp.emacs,gnu.emacs.help,gnu.epoch.misc
- Subject: Re: strange replace-regexp behavior
- Date: 30 Dec 92 14:45:38
- Organization: Bolt Beranek and Newman, Cambridge, MA 02138 USA
- Lines: 13
- Message-ID: <MAP.92Dec30144538@songlines.BBN.Com>
- References: <1992Dec28.133923.27974@nsisrv.gsfc.nasa.gov>
- Reply-To: Incoming Replies <MAP=Reply@BBN.Com>
- NNTP-Posting-Host: songlines.bbn.com
- In-reply-to: pat@gsfc.nasa.gov's message of Mon, 28 Dec 1992 13:39:23 GMT
-
- I've seen a couple of good descriptions of what went wrong and some
- interesting descriptions of how to fix this, but nobody has yet
- suggested the one that immediately came to me. Don't use
- replace-regexp at all... Here's what I'd use to delete the first and
- only the first ">" from a set of lines
-
- (replace-string "\n>" "\n")
-
- I just tried it on your sample text:
-
- In article 999, joe@blow said:
- >blah blah blah
- > blah blah blah
-