php-json 正则表达式匹配问题
程序员文章站
2024-01-08 20:37:04
...
phpjson正则表达式
有json表达式{"a":"aaaaaaaaa","aa":"baaaaaaaaa","aa":"caaaaaaaaa","b":{"c":1,"d":"ddddd"},"e":[1,2,5,9,7]}我用正则表达式/\".+\":\"[^\"]+\",/想分别提取"a":"aaaaaaaaa"和"aa":"baaaaaaaaa"还有"aa":"caaaaaaaaa"。但是运行结果确实直接"a":"aaaaaaaaa","aa":"baaaaaaaaa","aa":"caaaaaaaaa",一整串。求高手知道这是为什么