home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / emacs / 3885 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  1.1 KB

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