On 5/29/03 at 11:22 AM, [EMAIL PROTECTED] (Scot Robnett) wrote: > Okay, > > I've looked at perlre, perlretut, perldoc.com, Learning Perl, and a > partridge in a pear tree, and I'm still stupid. :) > > Does anyone out there have a working example script that does > matching over multiple lines, preferably an HTML file? I'm just > having a lot of difficulty with this and it would help to see some > real-world stuff. I've POD'd myself to death. >
>From perlfaq6: 'I'm having trouble matching over more than one line. What's wrong?' [...snip lots of useful info and code examples...] Here's code that finds everything between START and END in a paragraph: undef $/; # read in whole file, not just one line or paragraph while ( <> ) { while ( /START(.*?)END/sgm ) { # /s makes . cross line boundaries print "$1\n"; } } Perhaps post the code you wrote which does not work, or explain the specific difficulties that you are having. /A -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]