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.
サーバー側 (.NET) またはクライアント側 (javascript) で Word 2007 からコピー アンド ペーストされたテキストからタグを削除する方法はありますか。フォーマットなしで、テキストだけが必要です。
サーバーサイトのすべてのタグを削除することをお勧めします。これにより、JavaScriptが非アクティブ化されているユーザーにはタグが表示されなくなります。
using System.Text.RegularExpressions; string word2007 = "<h3>word2007</h3><p>test</p>"; Regex.Replace(word2007 ,"<[^>]*>",string.Empty)