var str = "my name is {name} and I live in {place}"
str.replace(/{name}/g, 'lola')
str.replace(/{name}/g, 'lola').replace(/{place}/g , 'city')
var str = 'my name is {name} and I live in {place}';
var dict = {
name: 'lola',
place: 'city'
};
var result = str.replace(/{(\w+)}/g, function(s, tag) {
return dict[tag];
});