raise an ImproperlyConfigured exception with argument string '"%s" is not a valid regular expression: %s',
raise ImproperlyConfigured ( '"%s" is not a valid regular expression: %s' % ( regex , six . text_type ( e ) ) )