[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] text extraction, multiple matches per line, sed preferred.
- Subject: [ale] text extraction, multiple matches per line, sed preferred.
- From: cfowler at outpostsentinel.com (Chris Fowler)
- Date: Fri, 12 Sep 2008 18:45:06 -0400
- In-reply-to: <[email protected]>
- References: <[email protected]>
Jim Popovitch wrote:
> I have a huge xml file, that has a ton of stanzas matching this:
>
> <file name="blah.blah.ext" properties=blah /><file
> name="blah2.blah.ext" properties=blah /><file name="blah3.blah.ext"
> properties=blah /><file name="blah4.blah.ext" properties=blah />
>
perl -e 'while(<STDIN>) { next unless m/file name="(.+?)"\s+prop/; print
"$_\r\n";}'
Not sed but more flexible :)
--
Chris Fowler
OutPost Sentinel, LLC
Support @ SIP/support at pbx.opsdc.com
or 678-804-8193
Email Support @ support at outpostsentinel.com