I need the Key/Value stuff from a Dictionary. What I do not need is that it does not allow duplicate Keys.
Regex template = new Regex(@"\{(?<key>.+?)\}(?<value>[^{}]*)");
IDictionary<string, string> dictionary = template.Matches(MyString)
.Cast<Match>()
.ToDictionary(x => x.Groups["key"].Value, x => x.Groups["value"].Value);
How can I return the Dictionary allowing duplicate keys?