(pattern, flags=0, verbose=False)
return re.compile(pattern, re.UNICODE | flags)
A wrapper for re.compile that checks whether "pattern" is a regex object
    or a string to be compiled, and automatically adds the re.UNICODE flag.
A wrapper for re.compile that checks whether "pattern" is a regex object
    or a string to be compiled, and automatically adds the re.UNICODE flag.
A wrapper for re . compile that checks whether pattern is a regex object or a string to be compiled and automatically adds the re . UNICODE flag .
def rcompile(pattern, flags=0, verbose=False):
    """A wrapper for re.compile that checks whether "pattern" is a regex object
    or a string to be compiled, and automatically adds the re.UNICODE flag.
    """

    if not isinstance(pattern, string_type):
        # If it's not a string, assume it's already a compiled pattern
        return pattern
    if verbose:
        flags |= re.VERBOSE
    return re.compile(pattern, re.UNICODE | flags)
def rcompile ( pattern , flags = 0 , verbose = False ) : if not isinstance ( pattern , string_type ) : # If it's not a string, assume it's already a compiled pattern return pattern if verbose : flags |= re . VERBOSE return re . compile ( pattern , re . UNICODE | flags )