匹配版本号

  private bool MatchVersion(string s)
        {
            bool match = false;
            Regex reg = new Regex(@"^(\d+)\.(\d+)\.(\d+)\.(\d+)$");
            if (reg.IsMatch(s))
            {
                match = true;
            }
            return match;
        }
原文地址:https://www.cnblogs.com/tianya/p/935787.html