def __init__(self, *args):
        self._pattern = None
        self._regexp = ''
        self._complete = None
        self._matcher = None

        nargs = len(args)
        if nargs == 2:
            regexp, errorMessage = args
            self._regexp = regexp
            RegexpValidator.__init__(self, regexp, True, errorMessage)
        elif nargs == 3:
            regexp, complete, errorMessage = args
            super(RegexpValidator, self).__init__(errorMessage)
            self._regexp = regexp
            self._pattern = re.compile(regexp)  # FIXME: check re use
            self._complete = complete
        else:
            raise ValueError, 'invalid number of arguments'
Creates a validator for checking that the regular expression matches
dataset/ETHPy150Open rwl/muntjac/muntjac/data/validators/regexp_validator.py/RegexpValidator.__init__