// Find formats: dd/mm/yy or dd/mm/yyy, seperators: -/. (i.e. 31.01.08 31-01-08 etc.)
Regex rx = new Regex(@"([1-9]|0[1-9]|[12][0-9]|3[01])[- /.]([1-9]|0[1-9]|1[012])[- /.]((19|20)\d\d|\d\d)");
// Define a test string.
string text = fileName;
// Find matches.
MatchCollection matches = rx.Matches(text);
// Report the number of matches found.
if (matches.Count > 1)
DoST();
// Report on each match.
foreach (Match match in matches)
{
textBoxDocumentDate.Text = match.Value;
}