ZacharyLuke
2016-02-17 05:47C# 正则表达式替换问题
请教:有一个字符串包含"<photo>abcde</photo>",不管"<photo></photo>"里面是什么,我都想把它替换成“”,也就是空。在C#里应当怎么写呢?
我只知道
using System.Text.RegularExpressions;
public static string Replace(string input, string pattern, string replacement);
但是不知道正则表达式怎么写?
- 点赞
- 回答
- 收藏
- 复制链接分享
3条回答
为你推荐
- 如何使用正则表达式捕获“多个”重复组
- regex
- 1个回答
- 正则表达式删除非utf-8字符但新行
- regex
- utf-8
- php
- 1个回答
- 始终使用正则表达式在两个字符之间添加空格
- regex
- php
- 1个回答
- 使用正则表达式递归替换匹配标记
- regex
- php
- 2个回答
- C#使用正则表达式,有没有一个方法能把符合条件的部分替换成序数
- c#
- visual studio
- 2个回答
换一换