I'm replacing all the inline gist snippets w/ a div to load them in a non blocking way. To modify all the legacy articles that have the following
<script src='https://gist.github.com/1234.js?file=gistfile1.sh'></script>
I need to replace it with the following instead
<div data-gist=1234><a href='http://gist.github.com/1234'>gistfile1.m</a></div>
So far what I'm trying (vim newb here) -doesn't seem to work
:%s/<script src='https:\/\/gist.github.com\/(d+).js?file=gistfile1.sh'><\/script>/<div data-gist={1}><a href='http://gist.github.com/{1}'>gistfile1.m</a></div>//g