Package org.apache.xmlbeans.impl.regex
Class Match
- java.lang.Object
-
- org.apache.xmlbeans.impl.regex.Match
-
- All Implemented Interfaces:
java.lang.Cloneable
public class Match extends java.lang.Object implements java.lang.Cloneable
An instance of this class has ranges captured in matching.
-
-
Constructor Summary
Constructors Constructor Description Match()
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
int
getBeginning(int index)
Return a start position in the target text matched to specified regular expression group.java.lang.String
getCapturedText(int index)
Return an substring of the target text matched to specified regular expression group.int
getEnd(int index)
Return an end position in the target text matched to specified regular expression group.int
getNumberOfGroups()
Return the number of regular expression groups.
-
-
-
Method Detail
-
clone
public java.lang.Object clone()
-
getNumberOfGroups
public int getNumberOfGroups()
Return the number of regular expression groups. This method returns 1 when the regular expression has no capturing-parenthesis.
-
getBeginning
public int getBeginning(int index)
Return a start position in the target text matched to specified regular expression group.- Parameters:
index
- Less thangetNumberOfGroups()
.
-
getEnd
public int getEnd(int index)
Return an end position in the target text matched to specified regular expression group.- Parameters:
index
- Less thangetNumberOfGroups()
.
-
getCapturedText
public java.lang.String getCapturedText(int index)
Return an substring of the target text matched to specified regular expression group.- Parameters:
index
- Less thangetNumberOfGroups()
.
-
-