-1
我有文字正则表达式忽略HTML标签
<p>This is some text
<span style="color: rgb(54, 54, 54);"> and here is a bit more</span>
and even more.
</p>
和这个正则表达式<[^>]*>
的字符串将抓住从它下面。
<p>
<span style="color: rgb(54, 54, 54);"></span>
</p>
我该如何获得相反的结果呢?我期待着取代文字。一直在搜索,只能设法找到使用上述正则表达式来替换去除标签的内容。
我正在寻找我的VueJS应用程序中的文本。
https://stackoverflow.com/questions/6520192/get-text-node-of-an-element – Amy
https://stackoverflow.com/a/44955924/392102 –