Hey motil, here's a good way to do it, I did it in C# as your code sample seemed to be in C#:
csharp Code:
  1. private void button1_Click(object sender, EventArgs e)
  2.         {
  3.             string s = "[PlayerID=12345]";
  4.             Regex patern = new Regex(@"\[(PlayerID=(\d+))\]");
  5.             MatchEvaluator matchEval = new MatchEvaluator(GetReplacement);
  6.  
  7.             s = patern.Replace(s,GetReplacement);
  8.  
  9.             MessageBox.Show(s);
  10.  
  11.         }
  12.  
  13.         private string GetReplacement(Match m)
  14.         {
  15.             return "<a href='somestaticwebaddress?" + m.Groups[1] + "'>" + m.Groups[2] + "</a>";
  16.         }

Basically in m.Groups[0] you get the complete match, in Groups[1] and Groups[2] you get the part of the match that are placed in parenthesis in the declared patern. Have a look at the MSDN page on MatchEvaluator, its very useful when it comes to using RegEx to replace values.

EDIT : I should've used StringBuilder in GetReplacement instead of concatenation operators.

Have fun with the RegEx !