Help for this page
$x =~ s{(?<=<td>)((?:(?!<td>).)*)3((?:(?!</td>).)*)(?=</td>)}{$1a$2};
$x =~ s{(?<=<td>) # Start match with open-tag ( # Capture ... </td> # then a close-tag )} # End lookahead and pattern {$1a}x;