Article From:


Match the city name, as long as the data after the first appearance

import re
a='The 6th floor of mirage building opposite Taigong Bus Township Company, Baiyun County, Bazhou District''(^\w+?District |(^\ w+? County) |(^\ w+? Town)',a).group()
print(b)#bazhou district


Link of this Article: RE Regular Matching of City Names

Leave a Reply

Your email address will not be published. Required fields are marked *