一个正确的IP地址可以苗书成:((2[0-4]/d|25[0-5]|[01]?/d/d?)/.){3}(2[0-4]/d|25[0-5]|[01]?/d/d?) http://deerchao.net/tutorials/regex/regex.htm#mission