[Perl-unix-users] matched pattern extraction

2004-05-17 Thread listmail
How can I work with extracting only the matched pattern in text in PERL just as with UNIX sed below: sed -n -e /\Starting_text.*/s/.*\(Starting_text.*Ending_text\).*/\1/p example from UNIX piping file contents to the above sed: blah blah Starting_text blah Ending_text blah blah ~~would return

Re: [Perl-unix-users] matched pattern extraction

2004-05-17 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > How can I work with extracting only the matched pattern in text in PERL just as with > UNIX sed below: > > sed -n -e /\Starting_text.*/s/.*\(Starting_text.*Ending_text\).*/\1/p > > example from UNIX piping file contents to the above sed: > > > blah blah Starting_tex