делай хотя бы так:
dialogtmp = dialogtmp.replace(/<input id="info(\d)" style="position: absolute; left: 150px;">/, (function(self) {
return function(all, info) {
return '<span id="info' + info + '">'+$("#info" + info,self).val()+'</span>';
}
})(this));