def _regex_validator(regex):
    """Validates the provided regular expression."""
    try:
        re.compile(regex)
    except Exception, e:
        raise ValidationError(e % 'This regex is invalid: %s')
dataset/ETHPy150Open reviewboard/ReviewBot/extension/reviewbotext/forms.py/_regex_validator/swapped operands of `%`