perl -e "$ARGV[0]=~s/a|b|f//g;print $ARGV[0]" aaabbcdeffgh cdegh