BaconBuilder.Model.Parser.Parse C# (CSharp) Method

Parse() public method

Replaces each matching regex key in the dictionary with its associated value for a given string.
public Parse ( string input ) : string
input string String to perform substitutions on.
return string
        public virtual string Parse(string input)
        {
            string output = input;

            foreach (KeyValuePair<string, string> kvp in RegexDict)
                foreach (Match m in Regex.Matches(input, kvp.Key))
                    output = Regex.Replace(output, kvp.Key, kvp.Value);

            return output;
        }