RegExp in EMACS

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Trent Shipley
Date:  
Subject: RegExp in EMACS

> -----Original Message-----
> From:
> [mailto:plug-discuss-admin@lists.PLUG.phoenix.az.us]On Behalf Of Kevin
> Buettner
> Sent: Monday, September 18, 2000 9:04 AM
> To:
> Subject: Re: RegExp in EMACS
>
>
> On Sep 18, 8:49am, Trent Shipley wrote:
>
> > I had already done this, and on your advice I have done so
> again. All I get
> > from C-h a regexp is a list that indicates EMACS has a built-in macro to
> > perform an interactive 'replace-regexp-with-string' but no interactive
> > facility that amounts to
> 'replace-regexp1-with-regexp2-refering-to-regexp1.'
>
> Could you give us an example of what it is that you'd like to do?
>
> (I know very little about emacs so I probably won't be able to help
> anyway, but I am intrigued, nevertheless.)
>


The problem is motivated by Oracle's SQL*Loader utility.

Transform
MAX_EXTENTS INTEGER EXTERNAL,
to
MAX_EXTENTS INTEGER EXTERNAL NULLIF MAX_EXTENTS=BLANKS,

In general terms this is roughly the RegExp (sub EMACS dialect)
Transform
\(^[ ]\)\(\w*\)(.*),
to
\N1\N2\N3 NULLIF \N2=BLANKS,