in reply to Regular expression question

if(/\[table\](.*?)\[\/table\]/) {print $1}

Replies are listed 'Best First'.
Re^2: Regular expression question
by morgon (Priest) on Sep 29, 2011 at 14:03 UTC
    my ($table_data) = $input =~ /\[table\](.*?)\[\/table\]/s;
    You need the "s"-modifier as the the table spans several lines.
      Many thanks for that, the /s turned out to be as important as the (.*?). It works well now.