Give headings IDs

Find:
(<h[1-6])(>)(.+)(</h[1-6]>)
Replace:
$1 id="$3"$2$3$4

Turns
<h4>Foobar</h4>
into
<h4 id="Foobar">Foobar</h4>

source

Leave a Reply