var reg = /\d+/g;
    var str = "grid30_r14_c5_value8.39";
    var ms = str.match(reg)
    alert(ms.join(','))