摘要: 最近发现博客园的一篇文章中包含javascript脚本, 每次打开时, 浏览器状态条中都显示脚本错误提示, 我想,如果谁在文章中插入恶作剧的脚本,就会正影响博客园的正常浏览,应该过滤掉文章内容中的脚本,用什么方法呢,我就想到了正则表达式,但这个正则表达式的匹配模式该怎么写,我试了很多方法,都没成功,后来,我终于发现正确的写法,原来是这么简单: public static string Filter... 阅读全文
posted @ 2004-02-23 16:02 dudu 阅读(8402) 评论(29) 推荐(0) 编辑
摘要: /* * This is a conversion of some of the regular expressions listed in * the Perl CookBook. * compile this sample with the command line: * csc /debug /r:System.Text.RegularExpressions.dll cookbook.cs ... 阅读全文
posted @ 2004-02-23 15:15 dudu 阅读(1736) 评论(0) 推荐(0) 编辑
摘要: http://weblogs.asp.net/dneimke/archive/2003/09/26/29197.aspx http://windows.oreilly.com/news/csharp_0101.html http://www.knowdotnet.com/articles/regereplacementstrings.html 阅读全文
posted @ 2004-02-23 14:45 dudu 阅读(228) 评论(0) 推荐(0) 编辑