Sorry. I just
in an open xterm. After several failures, and no more ideas. I closed the xterm, and asked for help. I didn't think it'd be of any use in the request.cat ./FILE.html | perl {...}
I've since read every single reference in the Perl documentation, and while I think I've got the RE part down. I'm quite sure I don't know how to feed Perl the file properly to do any more than eat a single line at a time.
So let me have another go at it. The following
won't work as#!/usr/bin/perl -w #retest.pl # my feeble attempt to a multi-line RE in Perl $regexp = shift; while (<>) { print if /$regexp/; }
because shift will only manage input one line at a time. Attempts to figure how to make use of psed, and s2p, have failed miserably.# ./retest.pl \</\div\>\n\<\/body\> ./FILE.html
Apologies for the previous noise, and thank you for the thoughtful responses.
--Chris
Yes. What say about me, is true.
In reply to Re^2: Perl RE; how to capture, and replace based on a block?
by taint
in thread Perl RE; how to capture, and replace based on a block?
by taint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |