- public static bool IsIP(string input)
- {
- Regex regex = new Regex("^\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}$");
- return regex.IsMatch(input);
- }
- //该片段来自于http://www.codesnippet.cn/detail/140120131603.html
来源: http://www.codesnippet.cn/detail/140120131603.html