using System;
using System.Text.RegularExpressions;
static void Main()
{
Regex r = new Regex(@"\b\d{2}\.\d{2}\.\d{2}\b");
string text1 = "Дата: 12.05.23";
string text2 = "Нет даты";
string text3 = "Дата рождения: 01.01.99";
string text4 = "Некорректная дата: 32.13.22"; // Пример некорректной даты
Console.WriteLine(r.IsMatch(text1)); // true
Console.WriteLine(r.IsMatch(text2)); // false
Console.WriteLine(r.IsMatch(text3)); // true
Console.WriteLine(r.IsMatch(text4)); // false
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CgoKICAgIHN0YXRpYyB2b2lkIE1haW4oKQogICAgewogICAgICAgIFJlZ2V4IHIgPSBuZXcgUmVnZXgoQCJcYlxkezJ9XC5cZHsyfVwuXGR7Mn1cYiIpOwogICAgICAgIHN0cmluZyB0ZXh0MSA9ICLQlNCw0YLQsDogMTIuMDUuMjMiOwogICAgICAgIHN0cmluZyB0ZXh0MiA9ICLQndC10YIg0LTQsNGC0YsiOwogICAgICAgIHN0cmluZyB0ZXh0MyA9ICLQlNCw0YLQsCDRgNC+0LbQtNC10L3QuNGPOiAwMS4wMS45OSI7CiAgICAgICAgc3RyaW5nIHRleHQ0ID0gItCd0LXQutC+0YDRgNC10LrRgtC90LDRjyDQtNCw0YLQsDogMzIuMTMuMjIiOyAvLyDQn9GA0LjQvNC10YAg0L3QtdC60L7RgNGA0LXQutGC0L3QvtC5INC00LDRgtGLCgogICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKHIuSXNNYXRjaCh0ZXh0MSkpOyAvLyB0cnVlCiAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoci5Jc01hdGNoKHRleHQyKSk7IC8vIGZhbHNlCiAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoci5Jc01hdGNoKHRleHQzKSk7IC8vIHRydWUKICAgICAgICBDb25zb2xlLldyaXRlTGluZShyLklzTWF0Y2godGV4dDQpKTsgLy8gZmFsc2UKICAgIH0K