suricata_check.utils.regex ========================== .. py:module:: suricata_check.utils.regex .. autoapi-nested-parse:: The `suricata_check.utils.regex` module contains regular expressions for matching various parts of rules. Functions --------- .. autoapisummary:: suricata_check.utils.regex.get_options_regex suricata_check.utils.regex.get_regex_provider suricata_check.utils.regex.get_rule_body suricata_check.utils.regex.get_rule_group_entries suricata_check.utils.regex.get_variable_groups suricata_check.utils.regex.is_valid_rule Module Contents --------------- .. py:function:: get_options_regex(options: collections.abc.Iterable[str]) -> regex.Pattern Returns a regular expression that can match any of the provided options. .. py:function:: get_regex_provider() Returns the regex provider to be used. If `regex` is installed, it will return that module. Otherwise, it will return the `re` module instead. .. py:function:: get_rule_body(rule: idstools.rule.Rule) -> str Returns the body of a rule. .. py:function:: get_rule_group_entries(group: str) -> collections.abc.Sequence[str] Returns a list of entries in a group. .. py:function:: get_variable_groups(value: str) -> collections.abc.Sequence[str] Returns a list of variable groups such as $HTTP_SERVERS in a variable. .. py:function:: is_valid_rule(rule: idstools.rule.Rule) -> bool Checks if a rule is valid.