def wildcards2patterns(wildcards):
 return [re.compile((('^' + wc.replace('.', '\\.').replace('*', '.*')) + '$')) for wc in wildcards]

def wildcards2patterns ( wildcards ) : return [ re . compile ( ( ( '^' + wc . replace ( '.' , '\\.' ) . replace ( '*' , '.*' ) ) + '$' ) ) for wc in wildcards ]
compute a list of regular expression patterns from a list of wildcard strings .