Package net.sf.saxon.regex
Class Operation.OpBackReference
java.lang.Object
net.sf.saxon.regex.Operation
net.sf.saxon.regex.Operation.OpBackReference
- Enclosing class:
- Operation
Back-reference
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.saxon.regex.Operation
Operation.OpAtom, Operation.OpBackReference, Operation.OpBOL, Operation.OpCapture, Operation.OpCharClass, Operation.OpChoice, Operation.OpEndProgram, Operation.OpEOL, Operation.OpGreedyFixed, Operation.OpNothing, Operation.OpReluctantFixed, Operation.OpRepeat, Operation.OpSequence, Operation.OpTrace, Operation.OpUnambiguousRepeat
-
Field Summary
FieldsFields inherited from class net.sf.saxon.regex.Operation
MATCHES_ZLS_ANYWHERE, MATCHES_ZLS_AT_END, MATCHES_ZLS_AT_START, MATCHES_ZLS_NEVER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondisplay()
Display the operation as a regular expression, possibly in abbreviated formiterateMatches
(REMatcher matcher, int position) Get an iterator returning all the matches for this operationint
Ask whether the regular expression is known, after static analysis, to match a zero-length stringMethods inherited from class net.sf.saxon.regex.Operation
containsCapturingExpressions, getInitialCharacterClass, getMatchLength, getMinimumMatchLength, optimize
-
Field Details
-
groupNr
int groupNr
-
-
Constructor Details
-
OpBackReference
OpBackReference(int groupNr)
-
-
Method Details
-
matchesEmptyString
public int matchesEmptyString()Ask whether the regular expression is known, after static analysis, to match a zero-length string- Specified by:
matchesEmptyString
in classOperation
- Returns:
- false. Returning true means that the expression is known statically to match ""; returning false means that this cannot be determined statically; it does not mean that the expression does not match "". We cannot do the analysis statically where back-references are involved, so we return false.
-
iterateMatches
Description copied from class:Operation
Get an iterator returning all the matches for this operation- Specified by:
iterateMatches
in classOperation
- Parameters:
matcher
- supplies the context for the matching; may be updated with information about captured groupsposition
- the start position to seek a match- Returns:
- an iterator returning the endpoints of all matches starting at the supplied position
-
display
Display the operation as a regular expression, possibly in abbreviated form
-