replace every number between tags using regular expresion and dreamweaver
===

I have a text full of references which i want to link to my reference page for example:
...[12] now the 12 needs to be replaced by a link which refers to reference 12 ref.html#ref12. This is easy

search:   

     \[(\d+)\]

replace by:

    <a href="ref.html#ref$1>$1</a>

But now my problem. Most of these references have 2 or more references like [12,13] of [12,13,14,15] now the numbers need to be replaces with a link to ref12 and ref13 thus it would be:

    ...[<a href="ref.html#ref12">12</a>,<a href="ref.html#ref13">13</a>]...

I want to peform a replace all because I have around 200 of these references

I don't mind doing multiple replacement, but I want to know when I'm ready. e.g. the last replacement had no items to replace,
