in reply to how to retrieve data between <script></script> and save to an array
I would like to write a perl script to ...
Are you sure? Have you read perlintro?
Lets see if I can avoid writing stuff :)
between < </ -> Require everything between innermost tags to compile.
Aww, off target, but a new search term emerges, tags. New try between tags -> Remove text between two Start and End Tags (Regex), Accessing data between two tags, Extracting text between HTML comments tags, Regular expression to match text between two tags (was: Help!! Regular Expressions)
That looks better, now for some copy/paste
my $left = quotemeta '<fun>'; my $right = quotemeta '</nuf>'; while( $line =~ /$left(.*?)$right/i ){ my $between = $1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to retrieve data between <script></script> and save to an array
by curd8341 (Initiate) on Apr 10, 2012 at 07:58 UTC | |
by Anonymous Monk on Apr 10, 2012 at 08:04 UTC | |
by curd8341 (Initiate) on Apr 11, 2012 at 00:47 UTC |