正则表达式 正则表达式限制00:00时间的格式。 if (!System.Text.RegularExpressions.Regex.IsMatch(textBox3.Text, "^([01][0-9]|2[0-3]):([0-5][0-9])$" )) { return; }