.NET コアアプリの C# と正規表現を使用して DOC ファイルをサニタイズする

Office および OpenOffice のドキュメント、スプレッドシート、プレゼンテーション、および Windows、Linux、macOS 上の DOC から機密情報を検索して削除します


.NET API のドキュメント テキストの秘匿化

メタデータの変更やコメントの削除機能を含む、PDF、Word、Excel、PowerPoint のドキュメントおよび画像からの機密情報や機密情報をサニタイズするための、形式に依存しない単一のインターフェイス。 GroupDocs.Redaction for .NET ツールを使用すると、機密情報を編集して編集した文書を PDF に保存し、すべてのページをラスター イメージに変換したり、文書を元の形式で保存してさらに編集したりできます。

C# 経由の正規表現を使用して DOC からのテキストを秘匿化する

GroupDocs.Redaction を使用すると、.NET 開発者は正規表現の最大限の強度を使用して、いくつかの簡単な手順で DOC ファイルを秘匿化できます。

  • Redactor クラスのインスタンスを作成し、DOC ファイルをロードします
  • RegexRedaction クラスのインスタンスを作成して、テキストを検索して置換します
  • RegexRedaction のオブジェクトを使用して Redactor.Apply メソッドを呼び出す

リダクション API を使ってみる

コマンドラインから nuget install GroupDocs.Redaction としてインストールするか、Visual Studio のパッケージ マネージャー コンソールから Install-Package GroupDocs.Redaction を使用してインストールします。 あるいは、ダウンロード からオフライン MSI インストーラーまたは ZIP ファイル内の DLL を取得し、プロジェクト内で手動で参照します。

using (Redactor redactor = new Redactor(@"sample.doc"))
{
	redactor.Apply(new RegexRedaction("\\d{2}\\s*\\d{2}[^\\d]*\\d{6}", new ReplacementOptions(System.Drawing.Color.Blue)));
	redactor.Save();
}

DOC Ja Live Demo

Checkout the free online demo for DOC Ja.

No need to set up

No need to write any code

Just upload the source file

Get the download link

What is DOC File Format?

Files with .doc extension represent documents generated by Microsoft Word or other word processing documents in binary file format. The extension was initially used for plain text documentation on several different operating systems. It can contain several different types of data such as images, formatted as well as plain text, graphs, charts, embedded objects, links, pages, page formatting, print settings and a lot others.

Read More

Other Ja Options

CSV Ja

(Comma Seperated Values)

DOCM Ja

(Microsoft Word 2007 Marco File)

DOCX Ja

(Office 2007+ Word Document)

DOT Ja

(Microsoft Word Template Files)

DOTM Ja

(Microsoft Word 2007+ Template File)

DOTX Ja

(Microsoft Word Template File )

PDF Ja

(Portable Document Format)

POT Ja

(Microsoft PowerPoint Template Files)

POTM Ja

(Microsoft PowerPoint Template File)

PPS Ja

(PowerPoint Slide Show)

PPSM Ja

(Macro-enabled Slide Show)

PPSX Ja

(PowerPoint Slide Show)

PPT Ja

(Microsoft PowerPoint 97-2003)

PPTM Ja

(Macro-enabled Presentation File)

PPTX Ja

(Open XML presentation Format)

RTF Ja

(Rich Text Format)

XLS Ja

(Microsoft Excel Spreadsheet (Legacy))

XLSM Ja

(Macro-enabled Spreadsheet)

XLSX Ja

(Open XML Workbook)

XLT Ja

(Excel 97 - 2003 Template)

XLTM Ja

(Excel Macro-Enabled Template)

XLTX Ja

(Excel Template)

Back to top
 日本