home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.help
- Path: sparky!uunet!pipex!demon!edscom!kevin
- From: kevin@edscom.demon.co.uk (Kevin Broadey)
- Subject: Re: regexp question
- In-Reply-To: del@giant.INTranet.COM's message of Tue, 1 Sep 1992 05:42:26 GMT
- Message-ID: <KEVIN.92Sep7124354@runningbear.edscom.demon.co.uk>
- Sender: kevin@edscom.demon.co.uk (Kevin Broadey)
- Organization: EDS-Scicon, Milton Keynes, UK
- References: <0095FF634B88F600.35E00332@giant.IntraNet.com>
- Date: Mon, 7 Sep 1992 12:43:54 GMT
- Lines: 28
-
- >>>>> In article <0095FF634B88F600.35E00332@giant.IntraNet.com>, "Del"
- >>>>> == del@giant.INTranet.COM (G. Del Merritt) replies:
-
- >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?
-
- Del> The _* says "replace whereever you find the character `_' _zero_ or
- Del> more times, which it "found" after every character. What did _you_
- Del> want to happen?
-
- >How can I get replace-regexp to do what I want?
-
-
- You want to do M-x replace-regexp _+ with ? The "+" means previous
- thing repeated 1 or more times (* means zero or more).
- --
- Kevin Broadey <kbroadey@edscom.demon.co.uk>
- EDS-Scicon, Wavendon Tower, Wavendon, Milton Keynes, MK17 8LX, England.
- Phone: +44 908 284198 (direct) or +44 908 585858 ext 4198
- These opinions are mine: others available on request.
-