Skip to content

custom

custom

Module that supports reading in custom Regex predictors from a config file.

Support reading in a YAML file of user defined predictor properties and load them into individual Regex predictors and patterns.

Example YAML:

namespace: acme # required prefix for all entity names regex: user_id: # the name of the entity that will be created patterns: - score: high # one of high, med, low regex: "^user_id[\d]{8}_[A-Z]{3}" # the actual regex header_match: # regexes for header matches - uid - user - member phrase: names: # the name of the entity that will be created paths: - path: /path/to/wordlist.txt case: yes # default is "no"


Classes:

Name Description
CustomRegexPattern

A simplified version of the internal Pattern object used by

CustomRegexPattern(score, regex, header_match=list(), header_skip=list(), regex_compiled=None, header_match_compiled=list(), header_skip_compiled=list()) dataclass

A simplified version of the internal Pattern object used by custom managed Regex Patterns. This can be expanded as needed to provide more user-facing features for BYO patterns