Q:

Parse a string in c# after reading first and last alphabet

I want to cut a string in c# after reading first and last alphabet.
string name = "20150910000549659ABCD000007348summary.pdf";
string result = "ABCD000007348"; // Something like this

string name = "1234 ABCD000007348 summary.pdf";

After reading 1234 "A" comes and at last "s" comes so I want "ABCD000007348"

A:

Simply use Regex: 
string CutString(string input)
{
     Match result = Regex.Match(input, @"[a-zA-Z]+[0-9]+");
     return result.Value;
}

