home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / emacs / help / 4023 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.4 KB  |  41 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!pipex!demon!edscom!kevin
  3. From: kevin@edscom.demon.co.uk (Kevin Broadey)
  4. Subject: Re: regexp question
  5. In-Reply-To: del@giant.INTranet.COM's message of Tue, 1 Sep 1992 05:42:26 GMT
  6. Message-ID: <KEVIN.92Sep7124354@runningbear.edscom.demon.co.uk>
  7. Sender: kevin@edscom.demon.co.uk (Kevin Broadey)
  8. Organization: EDS-Scicon, Milton Keynes, UK
  9. References: <0095FF634B88F600.35E00332@giant.IntraNet.com>
  10. Date: Mon, 7 Sep 1992 12:43:54 GMT
  11. Lines: 28
  12.  
  13. >>>>> In article <0095FF634B88F600.35E00332@giant.IntraNet.com>, "Del"
  14. >>>>> == del@giant.INTranet.COM (G. Del Merritt) replies:
  15.  
  16. >Ok, I had the following text
  17. >
  18. >Computer Engineering meets in _________________
  19. >
  20. >
  21. >... I wanted to replace the sequnce of underscores with a question
  22. >mark so I did M-x replace-regexp _* with ? but it put question marks
  23. >between each letter of all the words.
  24. >
  25. >Why did this happen?
  26.  
  27. Del> The _* says "replace whereever you find the character `_' _zero_ or
  28. Del> more times, which it "found" after every character.  What did _you_
  29. Del> want to happen?
  30.  
  31. >How can I get replace-regexp to do what I want?
  32.  
  33.  
  34. You want to do  M-x replace-regexp _+ with ?  The "+" means previous
  35. thing repeated 1 or more times (* means zero or more).
  36. --
  37. Kevin Broadey <kbroadey@edscom.demon.co.uk>
  38. EDS-Scicon, Wavendon Tower, Wavendon, Milton Keynes, MK17 8LX, England.
  39. Phone: +44 908 284198 (direct) or +44 908 585858 ext 4198
  40. These opinions are mine: others available on request.
  41.