Article View: comp.emacs
Article #3288strange replace-regexp behavior
From: patrick m. ryan
Date: Mon, 28 Dec 1992 13:39
Date: Mon, 28 Dec 1992 13:39
33 lines
1512 bytes
1512 bytes
I was trying to remove a leading column of '>' characters
from some text and got some strange behavior from replace-regexp.
I have text something like this:
>In article 999, joe@blow said:
>>blah blah blah
>> blah blah blah
I wanted to remove the first '>' in each line. Thus, I did:
(replace-regexp "^>" "")
Instead of removing just the first '>' in each line, it removed
the whole sequence of '>' characters. It acted as though I
has used "^>*" for the first argument. I ended up with:
In article 999, joe@blow said:
blah blah blah
blah blah blah
I'm using Epoch 4.2 on a SPARC 10 under SunOS 4.1.3.
Any help would be appreciated.
thanks,
pat
--
"I have a cunning plan." -- Baldric
patrick m. ryan
nasa / goddard space flight center / oceans and ice branch / hughes stx
pat@jaameri.gsfc.nasa.gov / zmpmr@charney.gsfc.nasa.gov
Technical Details
Message-ID:
<1992Dec28.133923.27974@nsisrv.gsfc.nasa.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!nsisrv!patShow Full Headers
Complete Article Headers
Newsgroups: comp.emacs,gnu.emacs.help,gnu.epoch.misc Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!nsisrv!pat From: pat@gsfc.nasa.gov (patrick m. ryan) Subject: strange replace-regexp behavior Message-ID: <1992Dec28.133923.27974@nsisrv.gsfc.nasa.gov> Summary: replace-regexp isn't working properly Keywords: replace regexp emacs epoch Sender: usenet@nsisrv.gsfc.nasa.gov (Usenet) Nntp-Posting-Host: jaameri.gsfc.nasa.gov Organization: Goddard Space Flight Center X-Newsreader: TIN [version 1.1 PL8] Date: Mon, 28 Dec 1992 13:39:23 GMT Lines: 33