Replace filter pattern substitution method to permit filter with multiple pattern occurences