Class Replacer
Namespace: Aspose.Words.LowCode
Assembly: Aspose.Words.dll
ドキュメント内のテキストを検索して置換するためのメソッドを提供します。
public static class Replacer
継承
継承メンバー
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
メソッド
Replace(string, string, string, string)
指定された文字列パターンのすべての出現を、入力ファイル内の置換文字列で置き換えます。
public static int Replace(string inputFileName, string outputFileName, string pattern, string replacement)
パラメーター
inputFileName
string
入力ファイル名。
outputFileName
string
出力ファイル名。
pattern
string
置き換えられる文字列。
replacement
string
パターンのすべての出現を置き換える文字列。
戻り値
行われた置換の数。
Replace(string, string, SaveFormat, string, string)
指定された文字列パターンのすべての出現を、指定された保存形式で入力ファイル内の置換文字列で置き換えます。
public static int Replace(string inputFileName, string outputFileName, SaveFormat saveFormat, string pattern, string replacement)
パラメーター
inputFileName
string
入力ファイル名。
outputFileName
string
出力ファイル名。
saveFormat
SaveFormat
保存形式。
pattern
string
置き換えられる文字列。
replacement
string
パターンのすべての出現を置き換える文字列。
戻り値
行われた置換の数。
Replace(string, string, SaveFormat, string, string, FindReplaceOptions)
指定された文字列パターンのすべての出現を、指定された保存形式と追加オプションで入力ファイル内の置換文字列で置き換えます。
public static int Replace(string inputFileName, string outputFileName, SaveFormat saveFormat, string pattern, string replacement, FindReplaceOptions options)
パラメーター
inputFileName
string
入力ファイル名。
outputFileName
string
出力ファイル名。
saveFormat
SaveFormat
保存形式。
pattern
string
置き換えられる文字列。
replacement
string
パターンのすべての出現を置き換える文字列。
options
FindReplaceOptions
追加オプションを指定するためのAspose.Words.Replacing.FindReplaceOptionsオブジェクト。
戻り値
行われた置換の数。
Replace(Stream, Stream, SaveFormat, string, string)
指定された文字列パターンのすべての出現を、指定された保存形式で入力ストリーム内の置換文字列で置き換えます。
public static int Replace(Stream inputStream, Stream outputStream, SaveFormat saveFormat, string pattern, string replacement)
パラメーター
inputStream
Stream
入力ストリーム。
outputStream
Stream
出力ストリーム。
saveFormat
SaveFormat
保存形式。
pattern
string
置き換えられる文字列。
replacement
string
パターンのすべての出現を置き換える文字列。
戻り値
行われた置換の数。
Replace(Stream, Stream, SaveFormat, string, string, FindReplaceOptions)
指定された文字列パターンのすべての出現を、指定された保存形式と追加オプションで入力ストリーム内の置換文字列で置き換えます。
public static int Replace(Stream inputStream, Stream outputStream, SaveFormat saveFormat, string pattern, string replacement, FindReplaceOptions options)
パラメーター
inputStream
Stream
入力ストリーム。
outputStream
Stream
出力ストリーム。
saveFormat
SaveFormat
保存形式。
pattern
string
置き換えられる文字列。
replacement
string
パターンのすべての出現を置き換える文字列。
options
FindReplaceOptions
追加オプションを指定するためのAspose.Words.Replacing.FindReplaceOptionsオブジェクト。
戻り値
行われた置換の数。
Replace(string, string, Regex, string)
指定された文字列パターンのすべての出現を、正規表現を使用して入力ファイル内の置換文字列で置き換えます。
public static int Replace(string inputFileName, string outputFileName, Regex pattern, string replacement)
パラメーター
inputFileName
string
入力ファイル名。
outputFileName
string
出力ファイル名。
pattern
Regex
一致を見つけるために使用される正規表現パターン。
replacement
string
パターンのすべての出現を置き換える文字列。
戻り値
行われた置換の数。
Replace(string, string, SaveFormat, Regex, string)
指定された文字列パターンのすべての出現を、正規表現を使用して入力ファイル内の置換文字列で置き換え、指定された保存形式で行います。
public static int Replace(string inputFileName, string outputFileName, SaveFormat saveFormat, Regex pattern, string replacement)
パラメーター
inputFileName
string
入力ファイル名。
outputFileName
string
出力ファイル名。
saveFormat
SaveFormat
保存形式。
pattern
Regex
一致を見つけるために使用される正規表現パターン。
replacement
string
パターンのすべての出現を置き換える文字列。
戻り値
行われた置換の数。
Replace(string, string, SaveFormat, Regex, string, FindReplaceOptions)
指定された文字列パターンのすべての出現を、正規表現を使用して入力ファイル内の置換文字列で置き換え、指定された保存形式と追加オプションで行います。
public static int Replace(string inputFileName, string outputFileName, SaveFormat saveFormat, Regex pattern, string replacement, FindReplaceOptions options)
パラメーター
inputFileName
string
入力ファイル名。
outputFileName
string
出力ファイル名。
saveFormat
SaveFormat
保存形式。
pattern
Regex
一致を見つけるために使用される正規表現パターン。
replacement
string
パターンのすべての出現を置き換える文字列。
options
FindReplaceOptions
追加オプションを指定するためのAspose.Words.Replacing.FindReplaceOptionsオブジェクト。
戻り値
行われた置換の数。
Replace(Stream, Stream, SaveFormat, Regex, string)
指定された文字列パターンのすべての出現を、正規表現を使用して入力ストリーム内の置換文字列で置き換えます。
public static int Replace(Stream inputStream, Stream outputStream, SaveFormat saveFormat, Regex pattern, string replacement)
パラメーター
inputStream
Stream
入力ストリーム。
outputStream
Stream
出力ストリーム。
saveFormat
SaveFormat
保存形式。
pattern
Regex
一致を見つけるために使用される正規表現パターン。
replacement
string
パターンのすべての出現を置き換える文字列。
戻り値
行われた置換の数。
Replace(Stream, Stream, SaveFormat, Regex, string, FindReplaceOptions)
指定された文字列パターンのすべての出現を、正規表現を使用して入力ストリーム内の置換文字列で置き換え、指定された保存形式と追加オプションで行います。
public static int Replace(Stream inputStream, Stream outputStream, SaveFormat saveFormat, Regex pattern, string replacement, FindReplaceOptions options)
パラメーター
inputStream
Stream
入力ストリーム。
outputStream
Stream
出力ストリーム。
saveFormat
SaveFormat
保存形式。
pattern
Regex
一致を見つけるために使用される正規表現パターン。
replacement
string
パターンのすべての出現を置き換える文字列。
options
FindReplaceOptions
追加オプションを指定するためのAspose.Words.Replacing.FindReplaceOptionsオブジェクト。
戻り値
行われた置換の数。