content='[1502165009733][DEBUG][TID:140600116508416][asr_request_agent.cpp:219][ASRRequest::generate_asr_request]paramsjsonstring:{"pam":"IDPAAS","idx":"2","pdt":"4006","glb":"e3dece1a-057f-4abe-94bc-46ebde36f844","enc":"utf-8","rtn":"json","ptc":"101","app":"com.baidu.aip.huatuo","fun":"262400"}'#re.search()printre.findall(reg,content)正则是:^\[(\d+)]|glb\":\"(.*)\",\"enc|\[(\d+)]|idx\":\"(.*)",\"pdt可是为什么匹配的结果是[('1502165009733','','',''),('','','','2'),('','e3dece1a-057f-4abe-94bc-46ebde36f844','','')]数字里面有三个元素,而每个里面又有三个,但是想要的结果是['1502165009733','e3dece1a-057f-4abe-94bc-46ebde36f844','2']想问一下是正则错误了还是确实这样?
扬帆大鱼
呼如林
相关分类