def registerFilter(self, column, patterns, is_regex=False, <EOL>ignore_case=False):
if isinstance(patterns, str):<EOL><INDENT>patt_list = (patterns,)<EOL><DEDENT>elif isinstance(patterns, (tuple, list)):<EOL><INDENT>patt_list = list(patterns)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>if is_regex:<EOL><INDENT>if ignore_case:<EOL><INDENT>flags = re.IGNORECASE<EOL><DEDENT>else:<EOL><INDENT>flags = <NUM_LIT:0><EOL><DEDENT>patt_exprs = [re.compile(pattern, flags) for pattern in patt_list]<EOL><DEDENT>else:<EOL><INDENT>if ignore_case:<EOL><INDENT>patt_exprs = [pattern.lower() for pattern in patt_list]<EOL><DEDENT>else:<EOL><INDENT>patt_exprs = patt_list<EOL><DEDENT><DEDENT>self._filters[column] = (patt_exprs, is_regex, ignore_case)<EOL>
Register filter on a column of table.

        @param column:      The column name.
        @param patterns:    A single pattern or a list of patterns used for 
                            matching column values.
        @param is_regex:    The patterns will be treated as regex if True, the 
                            column values will be tested for equality with the
                            patterns otherwise.
        @param ignore_case: Case insensitive matching will be used if True.