StringMatcher

Defines a simple filter that applies to a file and determines whether or not it matches the pattern

 

__init__(self, match_patterns, negative_match=False): 

LLM Docstring

Initialize StringMatcher state from the supplied configuration.

  • match_patterns: object

    regex, matcher, predicate, or iterable of match specifications

  • negative_match: object

    whether to invert the match result

  • :returns: None

    None; the operation mutates state, writes output, or raises by design.

 

matches(self, f): 

LLM Docstring

Evaluate the configured matcher against the input and apply optional negation.

  • f: object

    string or file path being tested

  • :returns: bool

    whether the input satisfies the matcher after optional negation


Feedback

Examples

Templates

Documentation