04 2012 档案
摘要:Regex re = new Regex("<a[^>]+href=[^>]+>[^<]*</a>");//这个可以过滤掉所有的超链接的内容Regex re = new Regex("<a.*?>|</a>");//过滤超链接中的<a ....>xxx</a>标签,标签中xxx内容保留
阅读全文
摘要:<a href="http://www.baidu.com" onclick="alert('aa');return false;">gogog</a>.net cs文件的判断提示 if (recontent.Length < 10 || recontent.Length > 2000) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ok", "alert('内容长度应在10-2000字
阅读全文
摘要:using System.Text.RegularExpressions;public static bool IsInt(string inString){ Regex regex = new Regex("^[0-9]*[1-9][0-9]*$"); return regex.IsMatch(inString.Trim());}
阅读全文