统计自己用到的正则表达式

匹配中文:  [\u4e00-\u9fa5]    c# 用法   Regex reg = new Regex("[\u4e00-\u9fa5]");   reg.IsMatch(InputString);

干掉html里面的标签:

                        string    localContent=new download(htmlurl);

                        localContent = Regex.Replace(localContent, @"<style[^>]*>(?:.|[\r\n])*?</style>", "");
                        localContent = Regex.Replace(localContent, @"<!--[^>]*>(?:.|[\r\n])*?-->", "");
                        localContent = Regex.Replace(localContent, @"<script[^>]*>(?:.|[\r\n])*?</script>", "");
                        localContent = Regex.Replace(localContent, @"<[^>]*>(?:.|[\r\n])*?", "");

posted @ 2011-04-21 15:56  blueker_li  阅读(174)  评论(0编辑  收藏  举报