Great example! LittleStain
The Dictionary is sure a nice tool. For functions like this I would have to use REGEX in Unity. Ashley made some nice things for us. He has saved us from making a lot of common mistakes like typos.
Using a loop instead of repeat would have actually been a lot easier, haha..
Would have saved me two local variables..
(BTW: If you'd rather use REGEX, you can, ofcourse.. )