-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
(e-mail address removed) (Peter Mahnke) wrote in
Depends if you are looking for very exact tags (i.e. <table
colspan="2"> is the start of something you are interetest in.... or
(i.e. any tag that starts with <meta.
however a good generic test is:
$contents = $1 if ($_ =~ />(.[^<\/]*)<\//);
this will find the contents of a set of tags like you have mentioned,
it looks for everthing from a > until a </
No, it looks for everything from a < to a / or <, and if that character is
not immediately followed by a </ it fails.
Regular expressions are a poor way to parse a structured, hierarchical
markup such as HTML or XML. You really have to use a parser module for all
but the most trivial cases. (I usually use HTML::TokeParser for HTML, and
XML:

OM for XML. YMMV).
For future reference, comp.lang.perl is a defunct newsgroup. General Perl
questions should be posted to comp.lang.perl.misc where they are likely to
get a better response.
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBP4fqo2PeouIeTNHoEQJ7jgCgwsrTJzh/EHy8OkRkeqQi6MZTTtgAniqE
wPb3UEqnZrAyXsYxMgM7Rv6G
=Ghzn
-----END PGP SIGNATURE-----