Changes from fnmatch to re for greater control