ReplacingArgs

Overview

ReplacingArgs is a class in Aspose.Words FOSS for Java.

Provides data for a custom replace operation.

Edition status of its 14 listed members (a property and its accessor methods are listed separately, overloads once): 14 not yet exercised by a verified example.

This class declares 8 methods for ReplacingArgs objects in Java programs. Available methods include: getGroupIndex, getMatch, getMatchEndNode, getMatchNode, getMatchOffset, getReplacement, setGroupIndex, setReplacement. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package. Properties: groupIndex, match, matchEndNode, matchNode, matchOffset, replacement.

Properties

NameTypeAccessDescription
matchjava.util.regex.MatcherReadGets the match.
matchNodeNodeReadGets the node that contains the beginning of the match.
matchEndNodeNodeReadGets the node that contains the end of the match.
matchOffsetintReadGets the zero-based starting position of the match from the start of the node that contains the beginning of the match.
replacementStringRead/WriteGets or sets the replacement string.
groupIndexintRead/WriteIdentifies, by index, a captured group in the Match that is to be replaced with the Replacement string.

Methods

SignatureDescription
getMatch() → java.util.regex.MatcherReturns the match.
getMatchNode() → NodeGets the node that contains the beginning of the match.
getMatchEndNode() → NodeGets the node that contains the end of the match.
getMatchOffset() → intGets the zero-based starting position of the match from the start of the node that contains the beginning of the match.
getReplacement() → StringGets or sets the replacement string.
setReplacement(value: String)Sets the replacement value.
getGroupIndex() → intIdentifies, by index, a captured group in the Match that is to be replaced with the Replacement string.
setGroupIndex(value: int)Sets the group index value.

See Also