def case_i(string):
 return ''.join([(((('[' + c.upper()) + c.lower()) + ']') if c.isalpha() else c) for c in re.escape(string)])

def case_i ( string ) : return '' . join ( [ ( ( ( ( '[' + c . upper ( ) ) + c . lower ( ) ) + ']' ) if c . isalpha ( ) else c ) for c in re . escape ( string ) ] )
returns case insensitive regex .