in reply to Reg Ex Problem: Changing width dimension in HTML table

The curly brackets should only be around the numbers (i.e.  ${1}300${2}) but that is not your only problem as you will see when you make that change (hint: you don't want to capture the old table width).

Replies are listed 'Best First'.
Re: Re: Reg Ex Problem: Changing width dimension in HTML table
by nysus (Parson) on May 20, 2003 at 16:21 UTC
    OK, after a bit more tinkering, this seems to work:
    $rep_contact_info =~ s/(<\s*table.*?width\s*=\s*"*)\d*%*("*.*?)/${1}50 +0${2}/si;
    I'm sure it could be a lot prettier. Thanks for the bracket info.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop";
    $nysus = $PM . $MCF;
    Click here if you love Perl Monks