303674854cb25750a256248b852e9a25
ff6d136ddc5fdfeffaf53ff6ee95f185
25edfb22a4f469ecb59f1190150159c611111111111bed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c622222222222bed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c633333333333bed06894275b65c1ab86501b08a632eb
929d1f5ca49e04fdcb27f9465b944689
16b28748ea4df4d9c2150843fecfba68
303674854cb25750a256248b852e9a25
5c69336ffbc20d23018e48b396cdd57a
73de882deff7a050a357292d0a1fca9411111111111c72c1af5e0e7f90179c047c5ef85885e
67bc4f89d416b0b8236eaa5f43dee7422222222222282e295699cff932a4d4dabba39074c35
cd324b2387ec29e44e8e788c60648872
16b28748ea4df4d9c2150843fecfba68
61efbc585b8e00f933f609902925d66c
25edfb22a4f469ecb59f1190150159c611111111111bed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c622222222222bed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c633333333333bed06894275b65c1ab86501b08a632eb
929d1f5ca49e04fdcb27f9465b944689
bdbf87e96724290d05fd9a6f0c591c5f
f1b3ba8846c179e65eb68da95b01a812111111111115db79b134e9f6b82c0b36e0489ee08ed
f1b3ba8846c179e65eb68da95b01a812222222222225db79b134e9f6b82c0b36e0489ee08ed
f1b3ba8846c179e65eb68da95b01a812333333333335db79b134e9f6b82c0b36e0489ee08ed
94b3e26ee717c64999d7867364b1b4a3
正则表达式,如何将带有 class="label" 标识的元素里的内容批量替换?
你没有说明修改成什么,就假定删除吧!
$s =<<< TXT<div class="label"><dl> <dt>11111111111</dt> <dd>22222222222</dd> </dl></div><ul class="label"><li>11111111111</li><li>22222222222</li><li>33333333333</li></ul><p class="label"><a href="#">11111111111</a><a href="#">22222222222</a><a href="#">33333333333</a></p>TXT;echo preg_replace('#(<(\w+).+?class="label"\s*>).+?(</\2>)#s', '$1$3', $s);得
<div class="label"></div><ul class="label"></ul><p class="label"></p>