[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_text blah Ending_text blah blah > > ~~would return: > > Starting_text blah Ending_text
You could either use s2p to convert the sed to Perl or rewrite it in Perl which would be fairly simple. -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs