`pat` is a bad variable name. Rename this to `path_regex`. Good variable naming is _critical_ to readability and maintainability