Module refinery.units.meta.iffx
Expand source code Browse git
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from refinery.units.pattern import SingleRegexUnit
from refinery.units.meta import ConditionalUnit
class iffx(SingleRegexUnit, ConditionalUnit, extend_docs=True):
"""
Filter incoming chunks by discarding those that do not match the given
regular expression.
"""
def match(self, chunk):
return bool(self.matcher(chunk))
Classes
class iffx (regex, count=0, fullmatch=False, multiline=False, ignorecase=False)
-
Filter incoming chunks by discarding those that do not match the given regular expression.
Note: The reverse operation of a conditional unit uses the logical negation of its condition.
Expand source code Browse git
class iffx(SingleRegexUnit, ConditionalUnit, extend_docs=True): """ Filter incoming chunks by discarding those that do not match the given regular expression. """ def match(self, chunk): return bool(self.matcher(chunk))
Ancestors
Class variables
var required_dependencies
var optional_dependencies
Methods
def match(self, chunk)
-
Expand source code Browse git
def match(self, chunk): return bool(self.matcher(chunk))
Inherited members