Class InsertRegExGroups


public class InsertRegExGroups extends DerivePath
Generates an out string where $digit$ is replaced with the #digit group from a regex
Author:
Owen Feehan
  • Constructor Details

    • InsertRegExGroups

      public InsertRegExGroups()
    • InsertRegExGroups

      public InsertRegExGroups(RegEx regEx, String outPath)
      Creates a new InsertRegExGroups instance.
      Parameters:
      regEx - The regular-expression to use for matching groups.
      outPath - Constructs a path as an output, replacing $1, $2 etc. with the respective group from the matched regular-expression.
  • Method Details

    • deriveFrom

      public Path deriveFrom(Path source, boolean debugMode) throws DerivePathException
      Description copied from class: DerivePath
      Derives a new path from an existing path.
      Specified by:
      deriveFrom in class DerivePath
      Parameters:
      source - the path to derive from.
      debugMode - true if debug-mode is activated
      Returns:
      the derived path.
      Throws:
      DerivePathException - if anything goes wrong
    • setRegExString

      public void setRegExString(String regEx)
      The regular-expression to use for matching groups, overloaded to handle legacy situations where a string is supplied.
    • setRegEx

      public void setRegEx(RegEx regEx)
      The regular-expression to use for matching groups.
    • getRegEx

      public RegEx getRegEx()
      The regular-expression to use for matching groups.
    • getOutPath

      public String getOutPath()
      Constructs a path as an output, replacing $1, $2 etc. with the respective group from the matched regular-expression.
    • setOutPath

      public void setOutPath(String outPath)
      Constructs a path as an output, replacing $1, $2 etc. with the respective group from the matched regular-expression.