If it matches, then set variables equal to corresponding path and pattern.