I have a dictionary, for example:
var d = new Dictionary<string, string>();
d.Add("key1", "value1");
d.Add("key2", "value2");
d.Add("key3", "value3");
I have input string, for example:
var str = "[key1] - [key3]";
The result string should be:
"value1 - value3"
How can I achieve this with help of Regex?