Activate item based on a given pattern.