On Wed, 10 Jul 2002, Bart Lateur wrote: > On Wed, 10 Jul 2002 17:39:58 +0200 (MEST), Thomas De Groote wrote: > > >$string = LPW->get (or whatever)... > >if($string =~ s/<table>(.+)<\/table>/ig){ > > $table_contents = $1; > >} > > Don't forget the /s modifier, as commonly HTML tables are not on one > single line of text.
I think it should also be m// rather than s// (or even s///). This also only works if the table tags are NOT nested ... presumable the "Can I use Perl regular expressions to match balanced text?" question in perlfaq6 would apply in the case you expect nested tables. -- Marvin Crippen [EMAIL PROTECTED] DO-IT Program http://www.washington.edu/doit/ (206) 221-4166 It is by caffeine alone I set my mind in motion, It is by the beans of Java the thoughts acquire speed, The hands acquire shaking, the shaking become a warning. It is by caffeine alone I set my mind in motion.