Parsing through the text file and appending the patterns and paths to two lists