我有一个html页面作为字符串,如下所示,
"<div id="app">
<section>
<esi:include src="http://example.com/LICENSE" />
</section>
<section>
<esi:include src="http://test.com/LICENSE" />
</section>
</div>"
从上面的字符串中,需要提取所有esi标签(src的值将是动态的)。所以我需要正则表达式来提取所有匹配的标签。以 开头和结尾的示例正则表达式。<esi:include/>
预期输出为,
[<esi:include src="http://example.com/LICENSE" />, <esi:include src="http://test.com/LICENSE" />]
胡子哥哥
相关分类