private bool FoundMatch(string txt)
{
    try
    {
        return Regex.IsMatch(txt, @"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\
                                    .(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$");
    }
    catch (ArgumentException ex)
    {
        //   Syntax   error   in   the   regular   expression 
        return false;
    }
}

相关文章:

  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
  • 2022-01-18
  • 2021-07-17
  • 2021-12-20
猜你喜欢
  • 2021-11-27
  • 2021-10-20
  • 2021-07-12
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案