Script in python that takes in a file and matches patterns of a given size in the text of the file