select_patterns if given $PATTERNS