【发布时间】:2012-11-06 06:23:48
【问题描述】:
我正在尝试摆脱分隔文本。
例如:“this#101# is#102# a#103# test#104#”
结果:“这是一个测试”
尝试了以下不起作用的方法
string Pattern = @"(?<=#).*(?=#;)";
string text = "this#101# is#102# a#103# test#104#";
text = Regex.Replace(text, Pattern, string.Empty);
【问题讨论】: