home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.help
- Path: sparky!uunet!cis.ohio-state.edu!giant.INTranet.COM!del
- From: del@giant.INTranet.COM (G. Del Merritt)
- Subject: Re: regexp question
- Message-ID: <0095FF634B88F600.35E00332@giant.IntraNet.com>
- Sender: daemon@cis.ohio-state.edu
- Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu
- Date: Tue, 1 Sep 1992 05:42:26 GMT
- Lines: 32
-
- >Ok, I had the following text
- >
- >Computer Engineering meets in _________________
- >
- >
- >... I wanted to replace the sequnce of underscores with a question
- >mark so I did M-x replace-regexp _* with ? but it put question marks
- >between each letter of all the words.
- >
- >Why did this happen?
-
- The _* says "replace whereever you find the character `_' _zero_ or
- more times, which it "found" after every character. What did _you_
- want to happen?
-
- >How can I get replace-regexp to do what I want?
-
- Try:
- M-x replace-regexp _ with ?
-
- or:
- M-x replace-string _ with ?
-
- or:
- M-x replace-regexp _+ with ?
-
- Do any of these do what you want? In questions like this, it's best
- to post not only what you have and did, but also what you want...
-
- Del Merritt del@IntraNet.com ccavax!giant!del
- IntraNet, Inc., 255 Washington Street, Newton, MA 02158
- Voice: 617-527-7020; FAX: 617-527-6779
-