using System.Collections.Generic;
public static IEnumerable<string> Get(string input)
int last = -1, first = -1;
for (var index = 0; index < input.Length; index++)
if (!char.IsDigit(input[index]))
yield return input.Substring(first, last - first + 1);
else if (input[first] == input[index])
yield return input.Substring(first, last - first + 1);
public static void Main()
var input = "12346171par827here727next8number5052car";
Console.WriteLine(string.Join(", ", Get(input)));