Substring
string input = "OneTwoThree"; // Get first three characters string sub = input.Substring(0, 3); Console.WriteLine("Substring: {0}", sub); //result One
You can use a Regex for that purpose.
See also the MSDN topic about Regular Expression Language.
Label
String.IndexOf(subString)
String.Replace(subString, "")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)