Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Naive (re) solution in Clear category for Unix Match. Part 1 by obone
def unix_match(filename: str, pattern: str) -> bool:
from re import fullmatch
pattern = pattern.replace('.', '\\.').replace('*', '.*').replace('?', '.{1}')
return True if fullmatch(pattern, filename) else False
Aug. 31, 2019