Posted on: 11/7/2011 8:14:10 PM | Views : 201

Is this code efficient? I have many exp.Replace so maybe is better solution or this solution is ok?
string str = "........"; Regex exp; exp = new Regex(@"\[b\](.+?)\[/b\]"); str = exp.Replace(str, "<strong>$1</strong>"); exp = new Regex(@"\[i\](.+?)\[/i\]"); str = exp.Replace(str, "<em>$1</em>"); exp = new Regex(@"\[u\](.+?)\[/u\]"); str = exp.Replace(str, "<u>$1</u>"); ............ ...

Go to the complete details ...