正则表达式使用札记

正则表达式在线测试工具URL:http://tool.oschina.net/regex/

1.用正则表达式替换括号和其中的内容:

1 string str = "郜慧英(产品部)(研发)";
2 Regex regex = new Regex(@"([^)]*)|([^)]*)");
3 string output = regex.Replace(str,"");

随着使用,内容会持续添加。

原文地址:https://www.cnblogs.com/stevenjson/p/5415706.html