The function is as follow:
def user_regex(regex_type, regex, test_string):
my_regex = re.regex_type(regex, test_string)
#...
Which cause this error:
AttributeError at /
module 're' has no attribute 'regex_type'
Of course the user chooses between findall, sub etc. when the function is called in my script.