Package org.apache.xmlbeans.impl.regex
Class Match
- java.lang.Object
-
- org.apache.xmlbeans.impl.regex.Match
-
-
Constructor Summary
Constructors Constructor Description Match()Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()intgetBeginning(int index)Return a start position in the target text matched to specified regular expression group.StringgetCapturedText(int index)Return an substring of the target text matched to specified regular expression group.intgetEnd(int index)Return an end position in the target text matched to specified regular expression group.intgetNumberOfGroups()Return the number of regular expression groups.protected voidsetBeginning(int index, int v)protected voidsetEnd(int index, int v)protected voidsetNumberOfGroups(int n)protected voidsetSource(char[] chars)protected voidsetSource(String str)protected voidsetSource(CharacterIterator ci)
-
-
-
Method Detail
-
setNumberOfGroups
protected void setNumberOfGroups(int n)
-
setSource
protected void setSource(CharacterIterator ci)
-
setSource
protected void setSource(String str)
-
setSource
protected void setSource(char[] chars)
-
setBeginning
protected void setBeginning(int index, int v)
-
setEnd
protected void setEnd(int index, int v)
-
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 String getCapturedText(int index)
Return an substring of the target text matched to specified regular expression group.- Parameters:
index- Less thangetNumberOfGroups().
-
-