I am fetching some information from the sites and for example i am fetching address of some customers
address = ['Mr Thomas',
'+(91)-9849633132, 9959455935',
'+(91)-9849633132',
'9196358485',
'8846853128',
'8-4-236/2']
From the above list i want to ignore strings starting with +(91) and 9 and 8 which are nothing but the phone numbers, so i used regular expressions as below
import re
result = [i for i in address if not re.match(r"[98]\B", i)]
result
['Mr Thomas','+(91)-9849633132, 9959455935','+(91)-9849633132','8-4-236/2']
That is the strings starting with 9 and 8 are ignored but i want to ignore the strings starting with +(91) too , can anyone please let me know how to do this.