Regular Expression Help

Discussion in 'Perl Misc' started by S. Cole, Jun 13, 2008.

  1. S. Cole

    S. Cole Guest

    Hey,

    Can someone help create one/two regular expression(s) for this?


    code:
    <table width=100%% class='list'
    cellpadding=2 cellspacing=0>
    border-left: hidden; border-bottom: hidden;'>
    <font size=-1>1.</font></td>
    <td align=left valign=center style='border-bottom: hidden;'
    style='padding: 5 3 5 3'><font size=-1>English</font></td><td
    valign=center style='padding: 2 3 2 3; border-right: hidden; border-
    bottom: hidden;' ><table class=bar cellspacing=0 width=100
    height=4><td bgcolor=4684ee ></table>
    <table class=bar cellspacing=0 width=30 height=4><td bgcolor=dc3912 ></
    table>
    </td>
    </tr>
    </table>


    I want to pull out the width value located here:

    <table class=bar cellspacing=0 width=100 height=4>

    and

    <table class=bar cellspacing=0 width=30 height=4>


    It doesn't matter if it's done in one expression and the result is
    separated with a , (ie results = 100,30) or two expressions... one
    putting the width value of one and the other pulling the width value
    of the other.

    If anyone can help, it would be greatly appreciated.

    Shannon
     
    S. Cole, Jun 13, 2008
    #1
    1. Advertisements

  2. S. Cole

    S. Cole Guest

    I forgot to mention.. the code

    <table class=bar cellspacing=0 width=xx height=4>

    is mentioned multiple times throughout the entire page... so the
    expression can't just take that code only and extract it...

    It has to somehow reference the section (english) of the page as well.

    Shannon

    30 height=4>
     
    S. Cole, Jun 13, 2008
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.