level 1
CkzyBD
楼主
网页源中有如下章节代码:
<p class="center">一</p>
<p class="bodyContent">正文</p>
<p class="center">二</p>
<p class="bodyContent">正文</p>
<p class="center">三</p>
<p class="bodyContent">正文</p>
……
<p class="center">六十二</p>
<p class="bodyContent">正文</p>
请问如何用正则表达式将全部章节段落代码批量替换为章节二级标题代码:
<h2 class="center">一</h2>
2020年04月19日 08点04分
1
<p class="center">一</p>
<p class="bodyContent">正文</p>
<p class="center">二</p>
<p class="bodyContent">正文</p>
<p class="center">三</p>
<p class="bodyContent">正文</p>
……
<p class="center">六十二</p>
<p class="bodyContent">正文</p>
请问如何用正则表达式将全部章节段落代码批量替换为章节二级标题代码:
<h2 class="center">一</h2>