C# Regex replace using backreference
===

I have a fairly long string that contains sub strings with the following format:

    project[1]/someword[1]
    project[1]/someotherword[1]

There will be about 10 or so instances of this pattern in the string.


What I want to do is to be able to replace the second integer in square brackets with a different one. So the string would look like this for instance:

    project[1]/someword[2]
    project[1]/someotherword[2]




I''m thinking that regular expressions are what I need here. I came up with the regex:

    project\[1\]/.*\[([0-9])\]

Which should capture the group [0-9] so I can replace it with something else. I'm looking at MSDN Regex.Replace() but I'm not seeing how to replace part of a string that is captured with a value of your choosing. Any advice on how to accomplish this would be appreciated. Thanks much. 
