[ale] text extraction, multiple matches per line, sed preferred.

Chris Fowler cfowler at outpostsentinel.com
Fri Sep 12 18:45:06 EDT 2008


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




More information about the Ale mailing list