Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Unix Match. Part 1 by rodka81
import re
def unix_match(filename: str, pattern: str) -> bool:
return (
re.match(
pattern.replace(".", r"\.").replace("*", r".*").replace("?", r"\S"),
filename,
)
is not None
)
March 11, 2019
Comments: