RegexTest.RexplaceString("<[^>]*>", "<dfsd ><sdsfsd\"sdfsd>")
 
public class RegexTest{
/// <summary>
        /// 根据正则表达式替换指定字符串为空格()
        /// </summary>
        /// <param name="pattern"></param>
        /// <param name="strSource"></param>
        /// <returns></returns>
        public static string RexplaceString(string pattern, string strSource)
        {
            strSource = Regex.Replace(strSource, pattern,new MatchEvaluator(CapText));
            return strSource;
        }
       /// <summary>
        /// 逻辑处理,返回你要替换的目标字符串
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        public static string CapText(Match m)
        {
              // Get the matched string.
                 string x = m.ToString();
                  // If the first char is lower case...
                  if (char.IsLower(x[0]))
                   {
                    // Capitalize it.
                    return char.ToUpper(x[0]) + x.Substring(1, x.Length-1);
           }
      return x;
        }
 
}