Re: [SLUG] extract a block of text between tags.

From: Dylan William Hardison (dylanwh@tampabay.rr.com)
Date: Fri Jul 25 2003 - 17:59:14 EDT


Oh, wow. Today is Friday?

Right, I knew that. Happy Friday to all.

Hmm, yes. the ^ makes it safer.

On Friday, July 25, 2003 at 06:53PM -0400, btt@nethouse.com wrote:
> On Fri, Jul 25, 2003 at 05:18:56PM -0400, Dylan William Hardison wrote:
> > I think this would work better:
> > perl -ne'print if /begin/ .. /end/' file
> >
> > or this:
> > perl -ne'print if s/begin// .. s/end//' file
>
> I like it! I would only modify it thusly:
>
> perl -ne 'print if s/^begin// .. s/^end//' file
>
> or similarly in order to keep from ending too soon on some word
> containing the end tag.
>
> Happy Friday,
> Bill
>

-- 
Outside of a dog, a book is a man's best friend.  Inside a dog it's too
dark to read.
              -- Groucho Marx
-
GPG Fingerprint=D67D 2B75 53C6 9769 30E4  D390 239F C833 F32C F6F6
GPG KeyID=F32CF6F6



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:57:18 EDT