我在python中进行Web报废。我有以下数据,我只需要提取地址。
# AMEEn # MT****29 Clinics:MYData Clinic 12345-123 rue bridge, QC B3D 1G3Phone: (123)123-1234 Email: sodth@gmail.com MYData Clinic 12345-123 rue bridge, QC B3D 1G3Phone: (123)123-1234
我的逻辑是:
def getAddress(ent):
addressEntry = re.search('(?<=Clinics:)(.*?)(?=Phone: )', ent)
if addressEntry is None:
return None
return addressEntry.group(1)
答案 0 :(得分:1)