From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,8ba3632cfab6dd32 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-05-24 05:42:25 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!harris Subject: Re: ed... From: Bob Harris Newsgroups: comp.unix.tru64 Posted-And-Mailed: yes Message-ID: <240520010842291185%harris@zk3.dec.com> References: <3B0B7A58.5EBE103C@digital.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 8bit User-Agent: YA-NewsWatcher/5.0.1 Date: Thu, 24 May 2001 08:42:29 -0400 NNTP-Posting-Host: 16.140.32.194 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 990708144 16.140.32.194 (Thu, 24 May 2001 05:42:24 PDT) NNTP-Posting-Date: Thu, 24 May 2001 05:42:24 PDT Organization: Compaq Computer Corporation Xref: archiver1.google.com comp.unix.tru64:2303 [[ This message was both posted and mailed: see the "To," "Cc," and "Newsgroups" headers for details. ]] In article <3B0B7A58.5EBE103C@digital.com>, BL Venkatesh wrote: X How do I give a search pattern in 'ed' editor for a string that looks X the following: X abc { I'm not sure I understand the question, since it seems so obvious /abc { will find a line with "abc {" in it. If you want a regular expression, then: /abc.*{ # anything between 'c' and '{' or /[a-z][a-z0-9_]*.*{ # any alphanumeric or /abc[ ][ ]*{ # 'abc' white space '{' or /[a-z][a-z0-9_][ ][ ]*{ # alphanumeric white # space '{' are all regular expressions that should find "abc {" The man page for 'ed' says look at the 'grep' command man page for an explanation of what regular expressions are supported in 'ed'. If I misunderstood the question, my apologies. Bob Harris