fdutils/regex.py
def to_regex(r, flags=0):
    """ converts string to compiled regex if it is not already a regex object """
    if not is_instance_of_regex(r):
        return re.compile(r, flags=flags)
    else:
        return r
 converts string to compiled regex if it is not already a regex object 
converts string to compiled regex if it is not already a regex object
converts string to compiled regex if it is not already a regex object
def to_regex(r, flags=0):
    if not is_instance_of_regex(r):
        return re.compile(r, flags=flags)
    else:
        return r
def to_regex ( r , flags = 0 ) : if not is_instance_of_regex ( r ) : return re . compile ( r , flags = flags ) else : return r
converts string to compiled regex if it is not already a regex object
converts string to compiled regex if it is not already a regex object
""" converts string to compiled regex if it is not already a regex object """
r
flags