Hi. Ur problem probably has to do with how ur eating the HTML file. A regex with /s needs the entire file in one variable. If u do a line by line with <FILE> it won't work since u won't have everything in one var. Give this a try.
$file = join "", <FILE>; @divmatches = $file =~ m/<div[^>]*>(.+?)<\/div>/sg; As others have said using one of the HTML modules is the best way to handle general parsing, but in trivial cases simple regex's like this are fine. At 09:46 AM 10/21/2008 -0700, Andy Postulka wrote: >I'm having difficulty using RegExp to match/extract across several lines in an HTML file. > >I want to match and extract everything between a pair of HTML tags. >This Match/Extraction can occur over multiple lines in an HTML file. > >I'm using the following RegExp to test the HTML file for a Match/Extraction > > /<div >(.*?)<\/div>/s -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis" 00000100 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs