Find a pattern & make a table