Logo Search packages:      
Sourcecode: harvestman version File versions  Download package

def HarvestMan::rules::harvestManRulesChecker::__make_word_filter (   self,
) [private]

Create a word filter rule for HarvestMan 

Definition at line 1020 of file rules.py.

01020                                    :
        """ Create a word filter rule for HarvestMan """

        # Word filter strings can be simple or compound.
        # Simple strings are strings that can stand for a
        # word or a string.
        # Egs: Python.
        # Complex strings are expressions that can mean
        # boolean logic.
        # Egs: Python & Perl, Python || Perl, (Python || Perl) & Ruby

        # If more than one paren group found, replace | with (|)
        clparen = s.count(')')
        oparen  = s.count('(')
        if oparen != clparen:
            print 'Error in word regular expression'
            return None

        # if NOT is one of the members, reverse
        # the list.
        if '!' in self._rexplist:

        rstr = self.__make_word_regexp( self._rexplist )
        r = re.compile( rstr, re.IGNORECASE )
        return r

Generated by  Doxygen 1.6.0   Back to index