如果我有这个文字blob
"merchants":[{"name":"Berlins - Venice","description":"LA\'s Most
Authentic German Döner Experience.","should_show_ajax_etas":true,"id":3916
,"fulfillment_types_allowed":["DELIVERY"],,"name":"Clutch CaliMex",
"description":"Northern Mexican Cuisine."name":"LocaliVenice",
"description":"If 7-Eleven and Whole Foods Had A Love
Child...","should_show_ajax_etas":true,"id":1743
我正在尝试解析引号之间的name
值。所以万一,我正在尝试返回Berlins - Venice
,Clutch CaliMex
和LocaliVenice
。这是我在regex101
regex = re.compile(r'?<=\"name\":\")(.*)(?=\"description\"').
主要受here
启发但是,即使文本blob中还有两个Berlins
实例,它似乎也会从description
返回到description
的最后一个实例。
Berlins - Venice","description"..(truncated).."name":"Locali Venice",
同样,我只需要引号之间的餐馆名称