Class RegexPrefixCapturingPatternParser

  • All Implemented Interfaces:
    StepPatternParser

    public class RegexPrefixCapturingPatternParser
    extends Object
    implements StepPatternParser

    A step pattern parser that provides a step matcher which will capture parameters starting with the given prefix in any matching step. Default prefix is $.

    The parameter names are by default assumed to be any unicode-supported alphanumeric sequence, not limited to ASCII (see http://www.regular-expressions.info/unicode.html), i.e. corresponding to character class [\p{L}\p{N}\p{Pc}]. A different character class can optionally be provided.

    Author:
    Elizabeth Keogh, Mauro Talevi
    • Constructor Detail

      • RegexPrefixCapturingPatternParser

        public RegexPrefixCapturingPatternParser()
        Creates a parser which captures parameters starting with $ in a matching step and whose names are alphanumeric sequences.
      • RegexPrefixCapturingPatternParser

        public RegexPrefixCapturingPatternParser​(String prefix)
        Creates a parser which captures parameters starting with a given prefix in a matching step and whose names are alphanumeric sequences
        Parameters:
        prefix - the prefix to use in capturing parameters
      • RegexPrefixCapturingPatternParser

        public RegexPrefixCapturingPatternParser​(String prefix,
                                                 String characterClass)
        Creates a parser which captures parameters starting with a given prefix in a matching step and a given character class.
        Parameters:
        prefix - the prefix to use in capturing parameters
        characterClass - the regex character class to find parameter names