private bool isInputIpOk(string ipAddress, rexType type)
{
System.Text.RegularExpressions.Regex reg;
if(type == rexType.ipAddr)
reg = new System.Text.RegularExpressions.Regex(ipPattern);
else
reg = new System.Text.RegularExpressions.Regex(hostPattern);
if(!reg.IsMatch(ipAddress))
return false;
else
return true;
}