Package org.pcre4j

Class Pcre2MatchData

java.lang.Object
org.pcre4j.Pcre2MatchData

public class Pcre2MatchData extends Object
The match data where the results of the match are stored
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pcre2MatchData(int ovecsize)
    Create a new match data object
    Create a new match data object
  • Method Summary

    Modifier and Type
    Method
    Description
    org.pcre4j.api.IPcre2
    api()
    Get the PCRE2 API backing this match data
    long
    Get the handle of the match data
    long[]
    Get the output vector composed of offset pairs, each offset pair represents the start and end of the match.
    int
    Get number of the offset pairs in the output vector

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Pcre2MatchData

      public Pcre2MatchData(int ovecsize)
      Create a new match data object
      Parameters:
      ovecsize - the size of the output vector
    • Pcre2MatchData

      public Pcre2MatchData(Pcre2Code code)
      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