Match the patterns.