I want to replace html tags in vim but reuse what I found. Namely I want to replace
<div class="subSectionTitle">
Title 1
</div>
with
<h1>
Title 1
<h1>
I tried to use the s/pattern/replacement/
but somehow the string is not insert. After running
:%s/<div class="subSectionTitle">\_.\{-}<\/div>/<h1>\1<\/h1>/g
only get
<h1></h1>
could some one explain how the wildcard characters work in vim and why the \1
is not my desired text?