def convert_filter(text):
 text = text.strip().lower()
 if text.startswith('re:'):
  txt = text[3:].strip()
 else:
  txt = wildcard_to_re(text)
 try:
  return re.compile(txt, re.I)
 except:
  logging.debug('Could not compile regex: %s', text)
  return None

def convert_filter ( text ) : text = text . strip ( ) . lower ( ) if text . startswith ( 're:' ) : txt = text [ 3 : ] . strip ( ) else : txt = wildcard_to_re ( text ) try : return re . compile ( txt , re . I ) except : logging . debug ( 'Could not compile regex: %s' , text ) return None
return compiled regex .