Could you help me out how to replace anything between "666666&r=" and "&u" in the img src below ?
img src="img.php?&w=300&b=a&n=666666&r=3m&u=domain.com" class="graph"
Existing attempt
$("#changeimg").change(function() {
$('.graph').each(function(index) {
//var sub = t.replace(/^.*666666&r=(.*)&u=*$/, '1y'); ??
$(this).attr("src", sub);
});
});