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

  1. Xref: sparky comp.emacs:3873 gnu.emacs.help:5187 gnu.epoch.misc:1220
  2. Newsgroups: comp.emacs,gnu.emacs.help,gnu.epoch.misc
  3. Path: sparky!uunet!think.com!ames!nsisrv!pat
  4. From: pat@gsfc.nasa.gov (patrick m. ryan)
  5. Subject: strange replace-regexp behavior
  6. Message-ID: <1992Dec28.133923.27974@nsisrv.gsfc.nasa.gov>
  7. Summary: replace-regexp isn't working properly
  8. Keywords: replace regexp emacs epoch
  9. Sender: usenet@nsisrv.gsfc.nasa.gov (Usenet)
  10. Nntp-Posting-Host: jaameri.gsfc.nasa.gov
  11. Organization: Goddard Space Flight Center
  12. X-Newsreader: TIN [version 1.1 PL8]
  13. Date: Mon, 28 Dec 1992 13:39:23 GMT
  14. Lines: 33
  15.  
  16.  
  17.     I was trying to remove a leading column of '>' characters
  18. from some text and got some strange behavior from replace-regexp.
  19. I have text something like this:
  20.  
  21. >In article 999, joe@blow said:
  22. >>blah blah blah
  23. >> blah blah blah
  24.  
  25. I wanted to remove the first '>' in each line.  Thus, I did:
  26.  
  27.     (replace-regexp "^>" "")
  28.  
  29. Instead of removing just the first '>' in each line, it removed
  30. the whole sequence of '>' characters.  It acted as though I
  31. has used "^>*" for the first argument.  I ended up with:
  32.  
  33. In article 999, joe@blow said:
  34. blah blah blah
  35.  blah blah blah
  36.  
  37. I'm using Epoch 4.2 on a SPARC 10 under SunOS 4.1.3.
  38.  
  39. Any help would be appreciated.
  40.  
  41. thanks,
  42. pat
  43.  
  44. --
  45. "I have a cunning plan." -- Baldric
  46.                                                              patrick m. ryan
  47.      nasa / goddard space flight center / oceans and ice branch / hughes stx
  48.                      pat@jaameri.gsfc.nasa.gov / zmpmr@charney.gsfc.nasa.gov
  49.