Fulfill empty links using regexp and Sublime Text

Very often while doing some HTML slicing you may add links with text and leaving href attribute as #. It is fast and you know that you may change href attributes later. Now if you have many (>10) links, it is somehow boring to add links manually, so you can do it fast using regexp and Sublime Text.

In order to do that you have to use Search and Replace feature (Ctrl+h) in Sublime Text. Make sure that Regular Expression button is pressed (Alt+r or small square button on the bottom left).

In Find What: input: href=\"#\"([\s\w\"\=]*)>([\w\.]+)

In Replace With:  input:href="http://$2"$1>$2

Now all your links like:

<a href="#">www.bumbu.me</a>
<a href="#" class="one">www.bumbu.me</a>

Should become:

<a href="http://www.bumbu.me">www.bumbu.me</a>
<a href="http://www.bumbu.me" class="one">www.bumbu.me</a>