Roman @ Melihhov wrote: > In HTML parser how do I match JavaScripts, e.g. HTML code in a form of: > > <SCRIPT LANGUAGE="JavaScript"> > <!-- > /* this is what I need to extract (only the contents of the script in $1 possibly), >thank you */ > //--> > </SCRIPT> > > Ideas appreciated.
You can play with HTML::Parser or try a simple RE on it: my @scripts = $html =~ m#<SCRIPT\s+LANGUAGE="JavaScript">\s*<!--\s*(.*?)\s*//--> \s*</SCRIPT>#gis; -- ,-/- __ _ _ $Bill Luebkert ICQ=162126130 (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/ _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs