jQuery append images to table add new column

var re = new RegExp(‘(http:\\/\\/\\S+[\\.png|\\.jpg|\\.gif])’,’g’);

 

$(“tr .item_name”).each(function() {

    var newimage=”;

    var images = $(this).html().match(/http:\/\/\S+(\.png|\.jpg|\.gif)/g);

    var thumbs = $(this).html().replace(re, ‘<img src=”$1″ class=”thumbnail50″/>’); 

    $.each(images, function(index, value) { 

          newimage += “<img class=’thumbnail50′ src=”+value+”>”;

    });

    $(this).parent().prepend(“<td>BBB</td>”);

 

});