using System.Text.RegularExpressions;
namespace ConsoleApp4
{
class Program
{
static void Main(string[] args)
{
string str = "这里////是/////测试/字////符/////////串";
Regex regex = new Regex(@"/{1,}", RegexOptions.IgnoreCase);
// 连续斜杠替换一个斜杠
Console.WriteLine(regex.Replace(str, "/").Trim());
Console.ReadLine();
}
}
}