also preprocesses flags

def extend_regex2(regexpr, reflags=0):
    """
    also preprocesses flags
    """
    regexpr = extend_regex(regexpr)
    IGNORE_CASE_PREF = '\\c'
    if regexpr.startswith(IGNORE_CASE_PREF):
        # hack for vim-like ignore case
        regexpr = regexpr[len(IGNORE_CASE_PREF):]
        reflags = reflags | re.IGNORECASE
    return regexpr, reflags