perl -ne 'print unless m~\Q(.*)\E\$/'"'"',\$lines,\$matches\Q) 10.(.*)\E\$/'"'"',\$lines,\$matches\Q) (.*)\E\$/'"'"',\$lines,\$matches\)~x' input.txt