(* Remove Sin(x), itemizes expression *) Cases(a*Sin(x)+b*Sin(2*x)+c*Sin(5*x)+d*Sin(6*x), Sin(q_*x), 2) (* Remove Sin(qx) where q > 4 *) a*Sin(x)+b*Sin(2*x)+c*Sin(5*x)+d*Sin(6*x) /. Sin(q_*x) /; 4 0 (* same as *) ReplaceAll(a*Sin(x)+b*Sin(2*x)+c*Sin(5*x)+d*Sin(6*x), RuleDelayed(Condition(Sin(q_*x), 4 {y, -x}, "\n"); (* same as *) ReplaceAll({{5,3}, {6,2}, {7,1}}, RuleDelayed({x_, y_}, {y, -x}))