Tag automatic pattern detection