🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #2675

Re: Using regular expressions in Micro Emacs 3.10

#2675
From: Ross Johnson
Date: Sun, 19 May 1991 12:32
31 lines
1689 bytes
In <BADRI.91May14150327@elysium.warren.mentor.com> badri@warren.mentorg.com (Badri Lokanathan) writes:

>I am running Micro Emacs 3.10 alpha on a Mac.
>I encountered a couple of problems with the replace command:

>(2) Is it possible to "remember" a matched pattern and interpolate it
>into the replacement pattern (ala vi)? For those who are familiar with
>vi, how does one achieve something like

>s/\([a-z0-9]*\)_\([a-z0-9]*\)/\2_\1/

If you have or can get a version of "sed" for Macs then you could
use the filter-buffer (^X#) command using:

sed -e "s/\([a-z0-9]*\)_\([a-z0-9]*\)/\2_\1/"

as the filter command line. This works on both PC and Unix MicroEmacs
(I just checked).

	Cheers,

PS. I'm assuming Macs can do filtering, can they?
-- 
+----------------------+---+
| Ross Johnson	       |   | E-Mail: rpj@ise.canberra.edu.au
| Info Sciences and Eng|___|
| University of Canberra   | UUCP  : uunet!munnari!ise.canberra.edu.au!rpj
| PO Box 1                 | JANET : rpj%au.edu.canberra.ise@EAN-RELAY
| Belconnen  ACT    2616   | BITNET: rpj%ise.canberra.edu.au@relay.cs.net
| AUSTRALIA                |
+--------------------------+
Technical Details
Message-ID: <rpj.674656344@ise>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!manuel!csc.canberra.edu.au!echo!rpj
References: <BADRI.91May14150327@elysium.warren.mentor.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!manuel!csc.canberra.edu.au!echo!rpj
From: rpj@echo.canberra.edu.au (Ross Johnson)
Newsgroups: comp.editors
Subject: Re: Using regular expressions in Micro Emacs 3.10
Message-ID: <rpj.674656344@ise>
Date: 19 May 91 12:32:24 GMT
References: <BADRI.91May14150327@elysium.warren.mentor.com>
Sender: news@csc.canberra.edu.au
Distribution: comp
Organization: Info Sci & Eng, University of Canberra
Lines: 31