public static string[] GetReplacementStrings(string original, string pattern, bool includeOriginal) { // pattern and original might not be same length int maxIndex = Math.Max(original.Length, pattern.Length); List <int> positions = GetPatternPositions(pattern, maxIndex, '*'); List <int[]> subsets = ArrayUtility.CreateSubsets(positions.ToArray()); List <string> replacements = GenerateReplacements(original, pattern, subsets); if (includeOriginal) { replacements.Insert(0, original); } return(replacements.ToArray()); }