【发布时间】:2017-02-26 11:26:18
【问题描述】:
我想为 Notepad++ 录制一个宏,以在一个带有一些 -tags 和许多其他 XML-Tags 的 xml 文档中找到几个文本。所以我想使用正则表达式并需要一些帮助。我想我已经很接近了。
示例:<Caption>ThetextIwanttofind</Caption>
我的正则表达式:<Caption\b[^>]*>(.*?)</Caption>
问题在于结束标题标签。如何重写我的正则表达式以获取带有结束标题的内部文本?
感谢您的帮助!
<Caption\b[^>]*>(.*?)<Caption> --> 适用于没有结束标签的标题
【问题讨论】:
标签: regex xml caption innertext