[EMAIL PROTECTED] wrote: > Hello all, > > I am looking to loop through an HTML file line by line and write out the > contents of the line minus any image tags to another file. (This is to create > PDA friendly versions of our webpages). I usually use something like this to > remove certain characters (like in this case any " characters)from a line > > $_ =~ s/\"//g; > > > Does anyone have a reg-ex out there that will remove anything from > a "<IMG SRC" or "<img src" string to the next occurance of ">" ?
Untested code (the s qualifier on the end would work best if you have your HTML in one long string [in case your image tags can cross newline boundaries]): $html =~ s/<img\s+[^>]*>//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-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs