求一个正确的网址正则表达式,急 求一个正确的网址正则表达式,急 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string input = @"http://torch.2008.sina.com.cn/jz/other/2008-04-11/040666651.shtml\1"; string pattern = @"^http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?$"; if (Regex.IsMatch(input, pattern)) { Response.Write("成功"); } else { Response.Write("失败"); } string input = @"Http://torch.2008.sina.com.cn/jz/other/2008-04-11/040666651.shtml"; string pattern = @"^htp(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?$"; if (Regex.IsMatch(input,pattern,RegexOptions.IgnoreCase)) { Response.Write("成功"); } else { Response.Write("失败"); }不区分大小写 ^(\w+:\/\/)?([^\ .]+)(\.[^/: ]+)(:\d*)?([^# ]*)$赋值时c#使用@前辍,或者不使用@前辍但对\进行转义 求助一个SQL语句:Access2003 sql server 2000 服务无法启动!!! 字段连接 扩库,设备建好了,现在想换设备的路径,怎么改 关于数据库的问题 请教一个用SQL语句实现分页的问题 是不是sql2000惹的祸 触发器 对 text 怎么操作 多少分能解决 Report Service中自定义参数的问题 如何才能让SQL Server自动在我指定的时间内删除掉某个指定的表格? firefox下兼容js问题? SQL Server 2000查询语句 问题?急
string pattern = @"^http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?$";
if (Regex.IsMatch(input, pattern))
{
Response.Write("成功");
}
else
{
Response.Write("失败");
}
string pattern = @"^htp(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?$";
if (Regex.IsMatch(input,pattern,RegexOptions.IgnoreCase))
{
Response.Write("成功");
}
else
{
Response.Write("失败");
}不区分大小写