[C#] public static string StrExtract(string cSearchExpression, string cBeginDelim, string cEndDelim, int nBeginOccurence, int nFlags) { string cstring = cSearchExpression; string cb = cBeginDelim; string ce = cEndDelim; string lcRetVal = ""; //Check for case-sensitive or insensitive search if (nFlags == 1) { cstring = cstring.ToLower(); cb = cb.ToLower(); ce = ce.ToLower(); } //Lookup the position in the string int nbpos = At(cb, cstring, nBeginOccurence) + cb.Length - 1; int nepos = cstring.IndexOf(ce, nbpos + 1); //Extract the part of the strign if we get it right if (nepos > nbpos) { lcRetVal = cSearchExpression.Substring(nbpos , nepos - nbpos); } return lcRetVal; } public static string StrExtract(string cSearchExpression, string cBeginDelim) { int nbpos = At(cBeginDelim, cSearchExpression); return cSearchExpression.Substring(nbpos + cBeginDelim.Length - 1); } public static string StrExtract(string cSearchExpression, string cBeginDelim, string cEndDelim) { return StrExtract(cSearchExpression, cBeginDelim, cEndDelim, 1, 0); } public static string StrExtract(string cSearchExpression, string cBeginDelim, string cEndDelim, int nBeginOccurence) { return StrExtract(cSearchExpression, cBeginDelim, cEndDelim, nBeginOccurence, 0);I don't know whether they have added any functions since VS2005 into .NET but for me I had a job to do not spend my time working out all the extra code. So I used the toolkit. So if you find you are having to resort to typing in multiple lines of code and build your own missing functions, then why not use the pre built functions already in the toolkit. This function alone is a ratio of 30 lines to 0.