Aspose::Words::LowCode::Replacer::Replace method

Contents
[ ]

Replacer::Replace(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<System::IO::Stream>&, Aspose::Words::SaveFormat, const System::SharedPtr<System::Text::RegularExpressions::Regex>&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method

Replaces all occurrences of a specified character string pattern with a replacement string in the input stream using a regular expression, with the specified save format and additional options.

static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::SharedPtr<System::IO::Stream> &inputStream, const System::SharedPtr<System::IO::Stream> &outputStream, Aspose::Words::SaveFormat saveFormat, const System::SharedPtr<System::Text::RegularExpressions::Regex> &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
ParameterTypeDescription
inputStreamconst System::SharedPtr<System::IO::Stream>&The input stream.
outputStreamconst System::SharedPtr<System::IO::Stream>&The output stream.
saveFormatAspose::Words::SaveFormatThe save format.
patternconst System::SharedPtr<System::Text::RegularExpressions::Regex>&A regular expression pattern used to find matches.
replacementconst System::String&A string to replace all occurrences of pattern.
optionsconst System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&FindReplaceOptions object to specify additional options.

ReturnValue

The number of replacements made.

Remarks

If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.

If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.

See Also

Replacer::Replace(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<System::IO::Stream>&, Aspose::Words::SaveFormat, const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method

Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options.

static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::SharedPtr<System::IO::Stream> &inputStream, const System::SharedPtr<System::IO::Stream> &outputStream, Aspose::Words::SaveFormat saveFormat, const System::String &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
ParameterTypeDescription
inputStreamconst System::SharedPtr<System::IO::Stream>&The input stream.
outputStreamconst System::SharedPtr<System::IO::Stream>&The output stream.
saveFormatAspose::Words::SaveFormatThe save format.
patternconst System::String&A string to be replaced.
replacementconst System::String&A string to replace all occurrences of pattern.
optionsconst System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&FindReplaceOptions object to specify additional options.

ReturnValue

The number of replacements made.

Remarks

If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.

If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.

See Also

Replacer::Replace(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<Aspose::Words::Saving::SaveOptions>&, const System::SharedPtr<System::Text::RegularExpressions::Regex>&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method

Replaces all occurrences of a specified character string pattern with a replacement string in the input stream using a regular expression, with the specified save format and additional options.

static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::SharedPtr<System::IO::Stream> &inputStream, const System::SharedPtr<System::IO::Stream> &outputStream, const System::SharedPtr<Aspose::Words::Saving::SaveOptions> &saveOptions, const System::SharedPtr<System::Text::RegularExpressions::Regex> &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
ParameterTypeDescription
inputStreamconst System::SharedPtr<System::IO::Stream>&The input stream.
outputStreamconst System::SharedPtr<System::IO::Stream>&The output stream.
saveOptionsconst System::SharedPtr<Aspose::Words::Saving::SaveOptions>&The save options.
patternconst System::SharedPtr<System::Text::RegularExpressions::Regex>&A regular expression pattern used to find matches.
replacementconst System::String&A string to replace all occurrences of pattern.
optionsconst System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&FindReplaceOptions object to specify additional options.

ReturnValue

The number of replacements made.

Remarks

If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.

If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.

See Also

Replacer::Replace(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<Aspose::Words::Saving::SaveOptions>&, const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method

Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options.

static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::SharedPtr<System::IO::Stream> &inputStream, const System::SharedPtr<System::IO::Stream> &outputStream, const System::SharedPtr<Aspose::Words::Saving::SaveOptions> &saveOptions, const System::String &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
ParameterTypeDescription
inputStreamconst System::SharedPtr<System::IO::Stream>&The input stream.
outputStreamconst System::SharedPtr<System::IO::Stream>&The output stream.
saveOptionsconst System::SharedPtr<Aspose::Words::Saving::SaveOptions>&The save options.
patternconst System::String&A string to be replaced.
replacementconst System::String&A string to replace all occurrences of pattern.
optionsconst System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&FindReplaceOptions object to specify additional options.

ReturnValue

The number of replacements made.

Remarks

If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.

If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.

See Also

Replacer::Replace(const System::String&, const System::String&, Aspose::Words::SaveFormat, const System::SharedPtr<System::Text::RegularExpressions::Regex>&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method

Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression, with the specified save format and additional options.

static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, Aspose::Words::SaveFormat saveFormat, const System::SharedPtr<System::Text::RegularExpressions::Regex> &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
ParameterTypeDescription
inputFileNameconst System::String&The input file name.
outputFileNameconst System::String&The output file name.
saveFormatAspose::Words::SaveFormatThe save format.
patternconst System::SharedPtr<System::Text::RegularExpressions::Regex>&A regular expression pattern used to find matches.
replacementconst System::String&A string to replace all occurrences of pattern.
optionsconst System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&FindReplaceOptions object to specify additional options.

ReturnValue

The number of replacements made.

Remarks

If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.

If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.

See Also

Replacer::Replace(const System::String&, const System::String&, Aspose::Words::SaveFormat, const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method

Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options.

static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, Aspose::Words::SaveFormat saveFormat, const System::String &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
ParameterTypeDescription
inputFileNameconst System::String&The input file name.
outputFileNameconst System::String&The output file name.
saveFormatAspose::Words::SaveFormatThe save format.
patternconst System::String&A string to be replaced.
replacementconst System::String&A string to replace all occurrences of pattern.
optionsconst System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&FindReplaceOptions object to specify additional options.

ReturnValue

The number of replacements made.

Remarks

If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.

If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.

See Also

Replacer::Replace(const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Saving::SaveOptions>&, const System::SharedPtr<System::Text::RegularExpressions::Regex>&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method

Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression, with the specified save format and additional options.

static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, const System::SharedPtr<Aspose::Words::Saving::SaveOptions> &saveOptions, const System::SharedPtr<System::Text::RegularExpressions::Regex> &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
ParameterTypeDescription
inputFileNameconst System::String&The input file name.
outputFileNameconst System::String&The output file name.
saveOptionsconst System::SharedPtr<Aspose::Words::Saving::SaveOptions>&The save options.
patternconst System::SharedPtr<System::Text::RegularExpressions::Regex>&A regular expression pattern used to find matches.
replacementconst System::String&A string to replace all occurrences of pattern.
optionsconst System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&FindReplaceOptions object to specify additional options.

ReturnValue

The number of replacements made.

Remarks

If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.

If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.

See Also

Replacer::Replace(const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Saving::SaveOptions>&, const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method

Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options.

static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, const System::SharedPtr<Aspose::Words::Saving::SaveOptions> &saveOptions, const System::String &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
ParameterTypeDescription
inputFileNameconst System::String&The input file name.
outputFileNameconst System::String&The output file name.
saveOptionsconst System::SharedPtr<Aspose::Words::Saving::SaveOptions>&The save options.
patternconst System::String&A string to be replaced.
replacementconst System::String&A string to replace all occurrences of pattern.
optionsconst System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&FindReplaceOptions object to specify additional options.

ReturnValue

The number of replacements made.

Remarks

If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.

If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.

See Also

Replacer::Replace(const System::String&, const System::String&, const System::SharedPtr<System::Text::RegularExpressions::Regex>&, const System::String&) method

Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression.

static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, const System::SharedPtr<System::Text::RegularExpressions::Regex> &pattern, const System::String &replacement)
ParameterTypeDescription
inputFileNameconst System::String&The input file name.
outputFileNameconst System::String&The output file name.
patternconst System::SharedPtr<System::Text::RegularExpressions::Regex>&A regular expression pattern used to find matches.
replacementconst System::String&A string to replace all occurrences of pattern.

ReturnValue

The number of replacements made.

Remarks

If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.

If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.

See Also

Replacer::Replace(const System::String&, const System::String&, const System::String&, const System::String&) method

Replaces all occurrences of a specified character string pattern with a replacement string in the input file.

static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, const System::String &pattern, const System::String &replacement)
ParameterTypeDescription
inputFileNameconst System::String&The input file name.
outputFileNameconst System::String&The output file name.
patternconst System::String&A string to be replaced.
replacementconst System::String&A string to replace all occurrences of pattern.

ReturnValue

The number of replacements made.

Remarks

If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.

If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.

See Also