Pattern and flags