#region 是否为ip
public static bool FoundMatch(string str)
{
try
{
return Regex.IsMatch(str, @"^(\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)
{
return false;
}
}
#endregion
05-13
769