2010-03-23

[code snippet]清除html tag並清除多餘的空白

//清除Html Tag
string stripped = Regex.Replace(content, @"<(.|\n)*?>", string.Empty);

//清除多餘的空白
Regex r = new Regex(@"\s+");
stripped = r.Replace(stripped,@" ");

沒有留言:

在Hyper-V上跑ubuntu 22.04 Desktop, 裝完後一登入就凍住

如果你也遇到這情況, 你可以執行以下步驟 按 Ctrl+Alt+F3 進入 virtual console. (按Ctrl+Alt+F1 可以再回到GUI) 登入後執行下面指令 (更新kernel) * sudo add-apt-repository ppa:capp...