|
I don't quite understand the meaning of the landlord, but to replace each [content] of "[by: 郑信涛], [01: 18.50], [ar: 同 恩]", and keep the symbols in it, or the above Replace all the contents, if it is the former, use the following
string yourStr = ......;
string resultStr = Regex.Replace (yourStr, "\\[. *?\\]", "", RegexOptions.IgnoreCase);
If the latter, use the following
string yourStr = ......;
string resultStr = Regex.Replace (yourStr, "\\[. *\\]", "", RegexOptions.IgnoreCase); |
|