Package org.pcre4j
Class Pcre2MatchData
java.lang.Object
org.pcre4j.Pcre2MatchData
The match data where the results of the match are stored
-
Constructor Summary
ConstructorsConstructorDescriptionPcre2MatchData(int ovecsize) Create a new match data objectPcre2MatchData(Pcre2Code code) Create a new match data object -
Method Summary
Modifier and TypeMethodDescriptionorg.pcre4j.api.IPcre2api()Get the PCRE2 API backing this match datalonghandle()Get the handle of the match datalong[]ovector()Get the output vector composed of offset pairs, each offset pair represents the start and end of the match.intGet number of the offset pairs in the output vector
-
Constructor Details
-
Pcre2MatchData
public Pcre2MatchData(int ovecsize) Create a new match data object- Parameters:
ovecsize- the size of the output vector
-
Pcre2MatchData
Create a new match data object- Parameters:
code- the compiled pattern to create the match data for
-
-
Method Details
-
api
public org.pcre4j.api.IPcre2 api()Get the PCRE2 API backing this match data- Returns:
- the PCRE2 API
-
handle
public long handle()Get the handle of the match data- Returns:
- the handle of the match data
-
ovectorCount
public int ovectorCount()Get number of the offset pairs in the output vector- Returns:
- the number of the offset pairs in the output vector
-
ovector
public long[] ovector()Get the output vector composed of offset pairs, each offset pair represents the start and end of the match. The value of the offset is the index of the byte where the character starts, not the charcater index.- Returns:
- the output vector
-