Pattern Detection Technique