def unescape_glob(string):
 def unescape(s):
  for pattern in '*[]!?':
   s = s.replace('\\{0}'.format(pattern), pattern)
  return s
 return '\\'.join(map(unescape, string.split('\\\\')))

def unescape_glob ( string ) : def unescape ( s ) : for pattern in '*[]!?' : s = s . replace ( '\\{0}' . format ( pattern ) , pattern ) return s return '\\' . join ( map ( unescape , string . split ( '\\\\' ) ) )
unescape glob pattern in string .