在 html 个标签之间查找正则表达式

Find regular expression between html tags

我正在尝试查找此模式的正则表达式。我尝试了一些东西,但 none 的工作。

我试过了 </a>(.*?)<a name

<a name="13" class="anchor"></a>
      Some Content here
<a name="14" class="anchor"></a>

所以我的预期结果应该是这里有一些内容

这样就可以了:

查找:</a>\s*\K[\s\S]*?(?=<a name)

解释:

</a>\s*         # </a> followed by 0 or more spaces
\K              # forget all we have seen until this position
[\s\S]*?        # 0 or more any character, including linebreaks
(?=<a name)     # positive lookahead, make sure we have "<a name" after