我想删除所有带有单词的行,除了 html 标签:
<p class="bandy">Cars and jupiter</p>
Comentezi folosind contul tău WordPress pentru a nu induce in eroare.
</p>
<p class="mb-40px">I love you</p>
Seems to be a happy day with you next to me.
</li>
<p class="simony">Select original books</p>
bunica isi face cumparaturile la magazin.
输出
<p class="bandy">Cars and jupiter</p>
</p>
<p class="mb-40px">I love you</p>
</li>
<p class="simony">Select original books</p>
我的正则表达式不太好:
寻找:.*^(?!<p class=).*
替换为:LEAVE EMPTY
^.*<.+?>.*$(*SKIP)(*F)|.
LEAVE EMPTY
. matches newline
解释:
截图(之前):
截图(之后):
使用以下内容:
^((?!<p class=.+</p>).)*$
LEAVE EMPTY
. matches newline
或者
^((?!<p class=).)*$
LEAVE EMPTY
使用以下内容:
^[^</>\r\n]+$
LEAVE EMPTY
. matches newline