let regex = "(?<province>[^省]+省|.+自治区)(?<city>[^自治州]+自治州|[^市]+市|[^盟]+盟|[^地区]+地区|.+区划)(?<county>[^市]+市|[^县]+县|[^旗]+旗|.+区)?(?<village>.*)"; let address = "山东省济南市天桥区新徐工业园666号满运物流东排1号"; console.log(address.match(regex));