古星4周年啦!10万现金等您来抢~四重大礼回馈新老买家

C#正则表达式判断是否为IP地址

       public static bool IsIP(string ip)
        {
            
//判断是否为IP
            return Regex.IsMatch(ip, @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$");
        }
posted @ 2009-08-24 00:00  nginx  阅读(8427)  评论(5编辑  收藏  举报
古星4周年啦!10万现金等您来抢~四重大礼回馈新老买家