weixin_43171837的博客

私信 关注
9527.
码龄2年
  • 245
    被访问量
  • 1
    原创文章
  • 1,100,947
    作者排名
  • 0
    粉丝数量
  • 于 2018-09-10 加入CSDN
获得成就
  • 获得1次点赞
  • 内容获得0次评论
  • 获得4次收藏
荣誉勋章
  • 最近
  • 文章
  • 资源
  • 问答
  • 课程
  • 帖子
  • 收藏
  • 关注/订阅

^((?!display:none).)*

这句只匹配了前面一个 后面的没匹配

回答的问题 #求一句正则表达式 过滤html 字符串中的display none
回答了问题于 3 月前

求一句正则表达式 过滤html 字符串中的display none

//样例1
<font>
                <div style="display: inline;">
                    <strong style="font-weight: normal;">
                        我是
                        <strong style="font-weight: normal;display:none;">御叶</strong>
                    </strong>
                </div>
            </font>
            </font>
            <font>
                <u style="text-decoration:none;">
                    <span>
                        <nav style="display: inline;">
                            需要(   )<b style="display:none;">
                                斡桐册僧偏麻
                            </b>
                        </nav>
                    </span>
                </u>
            </font>
            <font>
                <i style="font-style: normal;">
                    <font>
                        。【需要的:<u style="display:none;text-decoration:none;">
                            莞息廓疲顺
                        </u>
                    </font>
                </i>
            </font>
            <u style="text-decoration:none;">
                <div style="display: inline;">
                    信息】<u style="display:none;text-decoration:none;">存</u>
                </div>
            </u>
//样例2
    <span>
        <u style="text-decoration:none;">
            <b style="font-weight: normal;">需<u style="display:none;text-decoration:none;">毫衙</u></b>
        </u>
    </span><div style="display: inline;"><b style="font-weight: normal;">要<nav style="display:none;">里罩碎</nav></b></div>
    <nav style="display: inline;">
        <strong style="font-weight: normal;">
            <div style="display: inline;">
                <strong style="font-weight: normal;">
                    <div style="display: inline;">的<i style="font-style: normal; display: none;">鹤狄钧柏1</i></div>
                </strong>
            </div>
        </strong>
    </nav>

//样例3
    <font>
        <font>
            <div style="display: inline;">
                <strong style="font-weight: normal;">
                   需要的
                    <strong style="font-weight: normal;display:none;">御叶</strong>
                </strong>
            </div>
        </font>
    </font>
    <font>
        <u style="text-decoration:none;">
            <span>
                <nav style="display: inline;">
                    信息(   )
                    <b style="display:none;">斡桐册僧偏麻</b>
                </nav>
            </span>
        </u>
    </font><font>
        <i style="font-style: normal;">
            <font>。【需要:<u style="display:none;text-decoration:none;">莞息廓疲顺</u></font>
        </i>
    </font><u style="text-decoration:none;"><div style="display: inline;">需要】<u style="display:none;text-decoration:none;">存</u></div></u>

//样例4
    <i style="font-style: normal;">
        <nav style="display: inline;">
            “需要<div style="display: none;">
                僵鞍穗艰钙
            </div>
        </nav>
    </i><div style="display: inline;">
        <nav style="display: inline;">
            <strong style="font-weight: normal;">
                <i style="font-style: normal;">
                    <nav style="display: inline;">需要<i style="font-style: normal; display: none;">霸</i></nav>
                </i>
            </strong>
        </nav>
    </div><b style="font-weight: normal;">
        <div style="display: inline;">
            <strong style="font-weight: normal;">
                <u style="text-decoration:none;">
                    <strong style="font-weight: normal;">
                        需要,
                        <span style="display:none;">魂拳调徐庙铎斥</span>
                    </strong>
                </u>
            </strong>
        </div>
    </b>
    <b style="font-weight: normal;">
        <font>
            <b style="font-weight: normal;">
                需要(    )。
                <i style="font-style: normal; display: none;">报州胰斤</i>
            </b>
        </font>
    </b><i style="font-style: normal;">
        <div style="display: inline;">
            <strong style="font-weight: normal;">
                <div style="display: inline;">
                    【需要】
                    <font style="display:none;">秘幼羿虑舆苇友</font>
                </div>
            </strong>
        </div>
    </i>

这里有四段html ,需求是提取出里面我标明的需要的字符串,这是被加了干扰的,主要是用了css 里的“display:none”

直接打开在网页可以看到正常的内容,代码里加了干扰

现在思路是用正则匹配出来“display:none”的html标签

奈何正则太渣 求高手帮助 或有其他思路请指导 感激

语言 C#

3回答
发布问题于 3 月前

Regular BackUp 1.1.exe

实时备份文件到本地电脑 并压缩成rar
exe
发布资源于 6 月前

三层asp.net留言板源码.rar

简单三层asp.net留言板源码 带数据库 前台显示留言信息 访客发布留言 管理员登陆 管理员对留言板的管理-----删除留言、回复留言 显示修改后的提示信息 功能详细设计 前台显示留言信息 查询数据库留言信息表后、经过DataLists 格式化输出所有留言信息 再跟DataLists添加数据源前对输出的信息进行分页显示 访客发布留言 访客浏览留言信息后可发布自己的留言信息 管理员登陆 要对留言信息进行删除、回复首先要进行登陆 管理员留言板的管理----删除留言、回复留言 获得管理员权限后方可对留言信息回复和删除的管理 显示修改后的提示信息
rar
发布资源于 11 月前

SqlServer 2017 下载地址及密钥下载地址

SqlServer 2017 下载地址及密钥下载地址SqlServer 2017 下载地址及密钥 SqlServer 2017 下载地址及密钥 下载地址: ed2k://|file|cn_sql_server_2017_developer_x64_dvd_11296175.iso|1769777152|E21AE7C3576C0BDF1BC0ADC541217FAC|/ Enterprise Co...
原创
214阅读
0评论
1点赞
发布博客于 2 年前

tinyxp 最小的Windows xp

TinyXP中文版是一个非常小的精简WinXP,运行速度非常快,而且只占400M硬盘空间,包括WINDOWS Documents and settings 和Program Files三个文件夹,只需40mb内存就可以让你的电脑运行如飞,适用于各种新旧电脑。不过考虑到以后需要运行其它软件,安装tinyxp中文版系统建议内存512mb,硬盘最少2GB即可。需要的朋友们可以下载试试吧!
rar
发布资源于 3 年前