我对这个正则表达式问题感到非常痛苦,所以我正在制作一个 epub 文件,我有大量的参考链接到最后的文件,我已经完成了,但现在我需要做一个返回链接,我需要将 id 标签号与链接正文 id 号匹配,我想我可以做一个正则表达式替换/查找...
参考文献 565
<p>Stuff goes here(The reference itself)</p>
<div class="back" style="text-align: justify;">
<a href="../Text/Filename.xhtml#body_ftn2(!!! I need this to match the number of the refferance(thats how the link in text are id'd, same number just body_ftn instead of ftn))">[ →&nbsp;Atgriezties uz piezīmes vietu tekstā ]</a>
</div>
现在我想我需要让它忽略中间部分,所以我在 regexr 中做了一些乱七八糟的事情并得到了这个,参考 (\d+)(?s).*?