正则表达式判断IP地址
                
                
                
                    
                        - 摘要:staticboolIsIPAddr(String^str){if(!(String::IsNullOrEmpty(str))){Regex^rx=gcnewRegex("^((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)$",RegexOptions::IgnorePatternWhitespace);returnrx->IsMatch(str);}returnfalse;}
 
                        - 标签:正则表达式 表达式 正则 
 
                        
                    
                 
                
                    
                    
    static bool IsIPAddr(String^ str)
{
		if (!(String::IsNullOrEmpty(str)))
		{
			Regex^ rx = gcnew Regex("^((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)$", RegexOptions::IgnorePatternWhitespace);
			return rx->IsMatch(str);
		}
		return false;
}