Modify to allow more than two parts in string-based wildcard permissions