日期:2014-05-17 浏览次数:20451 次
string tempStr = File.ReadAllText(@"C:\Users\myx\Desktop\Test.txt", Encoding.GetEncoding("GB2312"));//读取txt
string src="/editor/kindeditor/attached/media/20130626/20130626065054_3546.avi";
string pattern = @"(?i)<embed[^>]*?src=(['""]?)"+src+@"\1[^>]*?>";
tempStr = Regex.Replace(tempStr,pattern,"替换内容");
string regex = @"(?i)<embed[^>]*src=['""]?([^'""]+)\1[^/>]*?>",
flashMask = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"...\"><param name="movie" value=\"$1\" /><param name=\"quality\" value=\"high\"/></object>";
tempStr = Regex.Replace(html, regex, flashMask);
string regex = @"(?i)<embed\b[^>]*?src=(['""]?)([^'""]+)\1[^>]*?autostart=\1(?:true
------解决方案--------------------
false)\1[^>]*?>",
flashMask = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"...\"><param name="movie" value=\"$2\" /><param name=\"quality\" value=\"high\"/></object>";
result= Regex.Replace(html, regex, flashMask);
string tempStr = File.ReadAllText(@"C:\Users\myx\Desktop\Test.txt", Encoding.GetEncoding("GB2312"));//读取txt
string pattern = @"(?i)<embed[^>]*?src=(['""]?)([^'""]*?)\1[^>]*?>";
tempStr = Regex.Replace(tempStr, pattern, a => {