in reply to Re: Pattern Search on HTML source.
in thread Pattern Search on HTML source.

Why something like this doesn't work?

if ( $line_test=~/<!-- 1st table -->\s*(.*?)\s*<!-- \/1st table -->/g) +{print $1;}


If it has a carriage return or new line.

Replies are listed 'Best First'.
Re^3: Pattern Search on HTML source.
by NetWallah (Canon) on Jan 01, 2008 at 03:41 UTC
    Try adding an "s" modifer, along with your"g".

    s

    Treat string as single line. That is, change "." to match any character whatsoever, even a newline, which normally it would not match.

         "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom