例:
string s = "2005-2-21";
Regex reg = new Regex(@"(?
一致 match = reg.Match(s);
int year = int.Parse(match.Groups["y"].Value);
int month = int.Parse(match.Groups["m"].Value);
int day = int .Parse(match.Groups["d"].Value);
DateTime 時間 = new DateTime(年,月,日);