High and Tight Flags

Hi,

Is there a script lying around anywhere for identifying potential High and Tight Flag patterns?