Well, this does it, but it's not the optimal solution. There's lots of repetition and one side is clearly the artist and the other a song, so it looks kind of off to me. You know better than me what you want though...

I never thought I'd see MBF and JLH mentioned in the same breath...

#!/usr/bin/perl use strict; use warnings; use diagnostics; use Data::Dumper; my $html = '<TABLE width=468 style="border-collapse:collapse"> <TR><TD><TABLE width=468 style="border-collapse:collapse" cellpadding= +2> <TR><TD class=head>Artist</TD><TD class=head>Song</TD></TR> <TR class=g><TD class=i><A href="/my-bloody-valentine-rxzg3.html">My B +loody Valentine</A></TD><TD class=j><A href="/my-bloody-valentine-lov +ely-sweet-darlene-9lgrnkb.html">Lovely Sweet Darlene *</A></TD></TR> <TR class=h><TD class=i><A href="/jennifer-love-hewitt-d193f.html">Jen +nifer Love Hewitt</A></TD><TD class=j><A href="/jennifer-love-hewitt- +i-want-a-love-i-can-see-jv2mj67.html">I Want A Love I Can See *</A></ +TD></TR> <TR class=g><TD class=i><A href="/jennifer-love-hewitt-d193f.html">Jen +nifer Love Hewitt</A></TD><TD class=j><A href="/jennifer-love-hewitt- +no-ordinary-love-4rftntr.html">No Ordinary Love *</A></TD></TR>'; my @data = (); while ( $html =~ m|<TD class=\w><A href="([^"]+)">([^<]+)</A></TD>|g ) { push( @data, { link => $1, name => $2 } ); } print Dumper(\@data); #### result #### # $VAR1 = [ # { # 'link' => '/my-bloody-valentine-rxzg3.html', # 'name' => 'My Bloody Valentine' # }, # { # 'link' => '/my-bloody-valentine-lovely-sweet-darlene-9lgrnkb.ht +ml', # 'name' => 'Lovely Sweet Darlene *' # }, # { # 'link' => '/jennifer-love-hewitt-d193f.html', # 'name' => 'Jennifer Love Hewitt' # }, # { # 'link' => '/jennifer-love-hewitt-i-want-a-love-i-can-see-jv2mj6 +7.html', # 'name' => 'I Want A Love I Can See *' # }, # { # 'link' => '/jennifer-love-hewitt-d193f.html', # 'name' => 'Jennifer Love Hewitt' # }, # { # 'link' => '/jennifer-love-hewitt-no-ordinary-love-4rftntr.html' +, # 'name' => 'No Ordinary Love *' # } # ]; #


($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print

In reply to Re^3: multiple regex matching by Cody Pendant
in thread multiple regex matching by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.