You can make use of regular expressions or modules like XML::Twig.
one way to do this is
undef $/; $str =<DATA>; while ($str =~ /<([^\/]*[^>]*)>((?:(?!<\/\1>).)*)<\/\1>/gsi) { print "Data inside $1 tag:\t$2\n"; }
This works only if the tag does not have attribute like your input.
Thanks in advance
Prasad
In reply to Re: perl extraction from a file
by prasadbabu
in thread perl extraction from a file
by rsennat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |