请教:有一个字符串包含"<photo>abcde</photo>",不管"<photo></photo>"里面是什么,我都想把它替换成“”,也就是空。在C#里应当怎么写呢? 我只知道 using System.Text.RegularExpressions; public static string Replace(string input, string pattern, string replacement); 但是不知道正则表达式怎么写?
收起
你直接设置变量值为
"<photo></photo>"
不就行了,替换来干嘛。。
报告相同问题?