
/**////
/// 验证网址
///
///
///
public static bool IsUrl ( string source )
{
return Regex.IsMatch ( source, @"^(((file|gopher|news|nntp|telnet|http|ftp|https|ftps|sftp)://)|(www\.))+(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(/[a-zA-Z0-9\&%_\./-~-]*)?$", RegexOptions.IgnoreCase );
}



by: 发表于:2018-01-15 09:55:21 顶(0) | 踩(0) 回复
??
回复评论