I want to replace variable name between {{}} to its value, just like: I can using Dictionary like:
//var a = 10
//var b = 20
var pairs:[string:int]=["a":10,"b":20]
var str = "I have {{a}} apples and {{b}} pears"
And Target is "I have 10 apples and 20 pears" How Can I Do It In Swift Using Regex?