3
回答
java正则--匹配两个标签之间的内容
华为云4核8G,高性能云服务器,免费试用   

java正则匹配两个标签之间的内容,内容包含任意字符 

内容举例如下 

<p style="line-height: 25px;letter-spacing: 2px;">这是一篇普通稿件</p>
<p style="line-height: 25px;letter-spacing: 2px;">
  <video controls="controls" id="videoInfo" width="100%" title="8632cd2a8e74461d9c81671a2614846a" class="5" duration="00:03:49" preload="preload" 
        poster="http://101.201.66.168:82/kfcs/upload/Image/default/2017/03/20/8632cd2a8e74461d9c81671a2614846a/2_640_400.jpg">
        <source zcmsimagerela="" src="http://123.56.21.89/kfcs/vod/2017/03/20/8632cd2a8e74461d9c81671a2614846a/8632cd2a8e74461d9c81671a2614846a_h264_450k_mp4.mp4"  
                type="audio/mp4">
        </source>
        <source src="http://123.56.21.89/kfcs/vod/2017/03/20/8632cd2a8e74461d9c81671a2614846a/8632cd2a8e74461d9c81671a2614846a_h264_300k_mp4.mp4" type="audio/mp4">
        </source>
        <source src="http://123.56.21.89/kfcs/vod/2017/03/20/8632cd2a8e74461d9c81671a2614846a/8632cd2a8e74461d9c81671a2614846a_h264_300k_mp4.mp4" type="audio/mp4">
        </source>您的浏览器不支持 video 标签。
  </video>
</p>

<p class="afterVideo"></p>
<p style="line-height: 25px;letter-spacing: 2px;"></p>
<p class="afterVideo"></p>
<p style="line-height: 25px;letter-spacing: 2px;"></p>
<p class="afterVideo">这是第二个视频 &nbsp;</p>

<p class="afterVideo">
 <video controls="controls" id="videoInfo" width="100%" title="6efcaa814c1b492fa8c35267e397ac7f" class="5" duration="00:00:10" preload="preload" poster="http://101.201.66.168:82/kfcs/upload/Image/default/2017/03/14/6efcaa814c1b492fa8c35267e397ac7f/2_640_400.jpg">
  <source src="http://123.56.21.89/kfcs/vod/2017/03/14/6efcaa814c1b492fa8c35267e397ac7f/6efcaa814c1b492fa8c35267e397ac7f_h264_450k_mp4.mp4" type="audio/mp4"></source>
  <source src="http://123.56.21.89/kfcs/vod/2017/03/14/6efcaa814c1b492fa8c35267e397ac7f/6efcaa814c1b492fa8c35267e397ac7f_h264_300k_mp4.mp4" type="audio/mp4"></source>
  <source src="http://123.56.21.89/kfcs/vod/2017/03/14/6efcaa814c1b492fa8c35267e397ac7f/6efcaa814c1b492fa8c35267e397ac7f_h264_300k_mp4.mp4" type="audio/mp4"></source>您的浏览器不支持 video 标签。
 </video></p>


<p class="afterVideo"></p>
<p style="line-height: 25px;letter-spacing: 2px;"></p>
<p class="afterVideo"></p>
<p style="line-height: 25px;letter-spacing: 2px;"></p>
<p class="afterVideo"></p>

 

举报
求是科技
发帖于1年前 3回/447阅
顶部