才30风
public static bool checkIpAddress(string ipAddr)
{
System.Text.RegularExpressions.Regex checkIP=new System.Text.RegularExpressions.Regex(@"\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\b");
if (checkIP.Match(ipAddr).Success )
{
return true;
}
else
{
return false;
}
}
给我分数a
public static bool checkIpAddress(string ipAddr)
{
System.Text.RegularExpressions.Regex checkIP=new System.Text.RegularExpressions.Regex(@"\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\b");
if (checkIP.Match(ipAddr).Success )
{
return true;
}
else
{
return false;
}
}
给我分数a
你在适当的地方引用就可以了