日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > asp.net >内容正文

asp.net

.Net在线编辑工具.NET Fiddle

發布時間:2023/12/4 asp.net 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 .Net在线编辑工具.NET Fiddle 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

介紹

推薦工具:.NET Fiddle

推薦理由:在線調試,編譯,運行.net代碼,同時支持C#,VB.NET,F#

推薦說明::對于.NET開發者來說是福音,因為我們可以不用再擔心環境與龐大的IDE的問題,不管在任何時間,任何環境,如果有了什么點子,打開dotnetfiddle.net,輸入你的代碼;總的來說,它能夠讓你在瀏覽器窗體重復折騰代碼片段而無需運行Visual Studio。當你僅僅是調試少量代碼時這實在是太方便了。.NET Fiddle的一個最大賣點就是它是免費的。

網站截圖:

小試牛刀

看看我的代碼

using System;public class Program {public static void Main(){string img = "i<img style='aaa' />j<Img style='bbb' />k<img style='ccc' ></img>";Console.WriteLine(ReplacehtmlBody(img));Console.WriteLine(ReplacehtmlBody2(img));}public static string ReplaceRegex(string content, string regParen, string replyContent){string strOutput = System.Text.RegularExpressions.Regex.Replace(content, regParen, replyContent);return strOutput;}public static string ReplacehtmlBody(string htmlBody){if (string.IsNullOrWhiteSpace(htmlBody)){return htmlBody;}return ReplaceRegex(htmlBody, "(i?)(\\<img.*?style=['\"])([^\\>]+\\>)", "$2max-width: 80% !important;$3");}public static string ReplacehtmlBody2(string htmlBody){if (string.IsNullOrWhiteSpace(htmlBody)){return htmlBody;}var reg = new System.Text.RegularExpressions.Regex("(\\<img.*?style=['\"])([^\\>]+\\>)", System.Text.RegularExpressions.RegexOptions.IgnoreCase);return reg.Replace(htmlBody, "$1max-width: 80% !important;$2");} } <img style='max-width: 80% !important;aaa' />j<Img style='bbb' />k<img style='max-width: 80% !important;ccc' ></img> i<img style='max-width: 80% !important;aaa' />j<Img style='max-width: 80% !important;bbb' />k<img style='max-width: 80% !important;ccc' ></img>

網站地址

地址:

https://dotnetfiddle.net/

總結

以上是生活随笔為你收集整理的.Net在线编辑工具.NET Fiddle的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。