From: Bob Harris <harris@zk3.dec.com>
Subject: Re: ed...
Date: Thu, 24 May 2001 08:42:29 -0400 [thread overview]
Message-ID: <240520010842291185%harris@zk3.dec.com> (raw)
In-Reply-To: 3B0B7A58.5EBE103C@digital.com
[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]
In article <3B0B7A58.5EBE103C@digital.com>, BL Venkatesh
<bl.venkatesh@digital.com> 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
prev parent reply other threads:[~2001-05-24 12:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-23 8:52 ed BL Venkatesh
2001-05-24 12:42 ` Bob Harris [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox