replace the string "< tr > < td > {$id} < / td > < td > {$name} < / td > < / tr >" with {$id} with 10, and {$name} with Tony
var str = "< tr > < td > {$id} < / td > < td > {$name} < / td > < / tr >";
console.log(str.replace(/\{\$id\}/,10));
that"s all I can write. Do I have to write it twice? how can I match more than one at a time and replace it?
Please take a look at it. Thank you very much