RePattern

Basic regular expression conditions

Module: implementation.conditions.pattern

Methods and properties

Main methods and properties


__init__

Arguments:

  • pattern (Union[re.Pattern[str], str]): Regular expression pattern.

  • get_key (str): Key associated with data of type str that will be checked.


Scan through string looking for the first location where the regular expression pattern produces a match and if it is, return True.

Arguments:

  • input_data (Transformable): Data for processing

  • evaluator (Evaluator): Evaluator in context of which Condition executed.

Returns:

  • bool: Result of evaluation. Define that condition is fulfilled or not.


match

If zero or more characters at the beginning of string match the regular expression pattern return True.

Arguments:

  • input_data (Transformable): Data for processing

  • evaluator (Evaluator): Evaluator in context of which Condition executed.

Returns:

  • bool: Result of evaluation. Define that condition is fulfilled or not.



Last updated