translate glob patterns to regular expressions