I had the list with following strings below
some_list = [\'9196358485\',\'9966325645\',\'8846853128\',\'8-4-236/2\',\'9-6-32/45\',\'Need to fetch some string
Use a regular expression:
>>> import re >>> [i for i in some_list if not re.match(r"[98]\B|+\(91\)", i)] ['8-4-236/2', '9-6-32/45', 'Need to fetch some strings']
\B matches only within alphanumeric strings, so it matches between 9 and 1 but not between 9 and -.
\B
9
1
-