home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / emacs / help / 3920 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.2 KB  |  43 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!cis.ohio-state.edu!giant.INTranet.COM!del
  3. From: del@giant.INTranet.COM (G. Del Merritt)
  4. Subject: Re: regexp question
  5. Message-ID: <0095FF634B88F600.35E00332@giant.IntraNet.com>
  6. Sender: daemon@cis.ohio-state.edu
  7. Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu
  8. Date: Tue, 1 Sep 1992 05:42:26 GMT
  9. Lines: 32
  10.  
  11. >Ok, I had the following text
  12. >
  13. >Computer Engineering meets in _________________
  14. >
  15. >
  16. >... I wanted to replace the sequnce of underscores with a question
  17. >mark so I did M-x replace-regexp _* with ? but it put question marks
  18. >between each letter of all the words.
  19. >
  20. >Why did this happen?
  21.  
  22. The _* says "replace whereever you find the character `_' _zero_ or
  23. more times, which it "found" after every character.  What did _you_
  24. want to happen?
  25.  
  26. >How can I get replace-regexp to do what I want?
  27.  
  28. Try:
  29.     M-x replace-regexp _ with ?
  30.  
  31. or:
  32.     M-x replace-string _ with ?
  33.  
  34. or:
  35.     M-x replace-regexp _+ with ?
  36.  
  37. Do any of these do what you want?  In questions like this, it's best
  38. to post not only what you have and did, but also what you want...
  39.  
  40. Del Merritt    del@IntraNet.com    ccavax!giant!del
  41. IntraNet, Inc., 255 Washington Street, Newton, MA  02158
  42. Voice: 617-527-7020; FAX: 617-527-6779
  43.