Data Life by cerebral flow is coming to:---1) Prolonged jumping rate---2) Small holiday course---3) Hello this world---4) Dance rock coffee---5) Therapy unproven---Choose right answer:|1,3,5|2,5|1,2,3,5   5...Life by cerebral flow is coming to:---1) Prolonged jumping rate---2) Small holiday course---3) Hello this world---4) Dance rock coffee---5) Therapy unproven---Choose right answer:|1.,3.,5|2,5|1,2.,3,5    5where each line contains like that [Sentence]:---1)...(options)---n) ---[choose right ansewr]:|options| \tab [correct answer].I want to find all those sentences which does not have a match |[1-5],[1-5]?| OR |[1-5].,[1-5]?| so allowing also |1.,| and |1,|.My pseudocode in Perlperl -pe '                   # read the file a record at a time and auto-print (-p)    s/[0-5],[0-5]?//;    # remove those lines having the match    s/[0-5].,[0-5]?//;    # remove those lines having the match' filewhere problem is removal of whole lines which have those matches. I can match those things but to say: remove the whole line with the match is the challenge. How can remove those lines which have a match? 
Filter out combination options in lines
text processing;perl
Use -n instead of -p:perl -ne 'print unless /[0-5],[0-5]?|[0-5].,[0-5]?/' file-n processes the input line by line, but doesn't automatically print each line.I'm not sure what your goal is, so you might need to tweak the regexes, but the general approach should work.