RegexProgram#

public class RegexProgram#

Regex program class, closely following cudf::strings::regex_program.

Constructor Summary

Method Summary

capture()

Get the capture groups setting used to create this instance.

combinedFlags()

Combine the regex flags using ‘or’.

flags()

Get the regex flags setting used to create this instance.

pattern()

Get the pattern used to create this instance.

setCapture(CaptureGroups capture)

Reset the capture groups setting for this instance.

setFlags(EnumSet<RegexFlag> flags)

Reset the regex flags setting for this instance.

Constructors

public RegexProgram(String pattern)#

Constructor for RegexProgram.

Parameters:

pattern – Regex pattern

public RegexProgram(String pattern, EnumSet<RegexFlag> flags)#

Constructor for RegexProgram.

Parameters:
  • pattern – Regex pattern

  • flags – Regex flags setting

public RegexProgram(String pattern, CaptureGroups capture)#

Constructor for RegexProgram.

Parameters:
  • pattern – Regex pattern setting

  • capture – Capture groups setting

public RegexProgram(
String pattern,
EnumSet<RegexFlag> flags,
CaptureGroups capture
)#

Constructor for RegexProgram.

Parameters:
  • pattern – Regex pattern

  • flags – Regex flags setting

  • capture – Capture groups setting

Methods

public String pattern()#

Get the pattern used to create this instance.

Parameters:

return – A regex pattern as a string

public EnumSet<RegexFlag> flags()#

Get the regex flags setting used to create this instance.

Parameters:

return – Regex flags setting

public void setFlags(EnumSet<RegexFlag> flags)#

Reset the regex flags setting for this instance.

Parameters:

flags – Regex flags setting

public CaptureGroups capture()#

Get the capture groups setting used to create this instance.

Parameters:

return – Capture groups setting

public void setCapture(CaptureGroups capture)#

Reset the capture groups setting for this instance.

Parameters:

capture – Capture groups setting

public int combinedFlags()#

Combine the regex flags using ‘or’.

Parameters:

return – An integer representing the value of combined (or’ed) flags