Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个删除 html 的正则表达式:
sr.Text = Regex.Replace(sr.Text, @"<[^>]*>", "");
应该是什么正则表达式来删除 html 和
[youtube width="610" height="343"]http://www.youtube.com/watch?v=w_BPwoPbghw&hd=1[/youtube]
从帖子内容?
谢谢 !
通过尝试 [youtube.*[/youtube] 解决它 [youtube 之后有宽度和高度
最终代码: sr.Text = Regex.Replace(sr.Text, @"[youtube.*[/youtube]", "");