Python regex: Fix one html close tag -


<div>random contents without < or > , has ( )  <div> 

just need fix closing div tag

so looks <div>random contents</div>

i need in python regex.

the input exact first line, there no < or > in random contents

replace

(<div>[^<]*<)(div>) 

with

$1/$2 

note: bad practice, don't it unless it's absolutely necessary!


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -