[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] NewbieQ Perl filtering question
- Subject: [ale] NewbieQ Perl filtering question
- From: Mills.J at ems-t.com (Mills, John M.)
- Date: Fri, 30 Jun 2006 08:36:26 -0400
A LeD -
Thanks. Actually both those conditions are both met in my case.
- Mills
-----Original Message-----
...
> I need to return only the part of a text line that falls between two
> expected character strings, as it:
>
> Input: blah..blah..string1<good content>string2..garbage..garbage
> Output: <good_content>
...
$Input =~ /string1(.*)string2/s
$Output = $1
This assumes that string2 is never a substring of <good content>. You
can drop the s modifier if <good content> is never multiple lines.
-A