pytuflow.GridInput.is_match#
- GridInput.is_match(filter_by=None, lhs=None, rhs=None, regex=False, regex_flags=0, attrs=(), callback=None, comments=False)#
Returns True if the input matches the search parameters, which is made of multiple parameters.
See
find_input()
for details on the input filters.- Parameters:
filter_by (str, optional) – A string or regular expression to filter the input by. This will search through the entire input string (not comments).
lhs (str, optional) – A string or regular expression to filter the input by. This will search through the command side of the input (i.e. LHS).
rhs (str, optional) – A string or regular expression to filter the input by. This will search through the value side of the input (i.e. RHS).
regex (bool, optional) – If set to True, the filter, command, and value parameters will be treated as regular expressions.
regex_flags (int, optional) – The regular expression flags to use when filtering by regular expressions.
attrs (SearchTagLike, optional) – A list of attributes to filter the input by. This can be a string (single attribute key), or list/tuple of strings that will be used to filter the input by tag keys which correspond to properties contained in the input. Attributes themselves can be tuples with a value to compare against (key, value) otherwise the value will be assumed as True.
callback (Callable, optional) – A function that will be called with the input as an argument.
comments (bool, optional) – If set to True, will also search through comments.
- Returns:
True if the input matches the search parameters.
- Return type:
bool