我正在从网站获取一些信息,例如我正在获取一些客户的地址
address = ['Mr Thomas',
'+(91)-9849633132, 9959455935',
'+(91)-9849633132',
'9196358485',
'8846853128',
'8-4-236/2']
从上面的列表中,我想忽略+(91) and 9 and 8
以电话号码开头的字符串,所以我使用了如下的正则表达式
import re
result = [i for i in address if not re.match(r"[98]\B", i)]
结果
['Mr Thomas','+(91)-9849633132, 9959455935','+(91)-9849633132','8-4-236/2']
那就是以开头的字符串9 and 8
被忽略,但我也想忽略以开头的字符串+(91)
,谁能告诉我该怎么做。