我想从 JSON 文件中删除风味和 pkgT 字段,每行的格式如下:
"jobID":2598752", "account":"TG-CCR120014", "user":"charngda", "pkgT":{"mvapich2-new/1.2":{"libA":["libmpich.so.1.1"], "flavor":["default:pgi/7.2-5"]}}, "startEpoch":"1338608868", "runTime":"48", "execType":"user:binary", "exec":"IOR", "numNodes":"4", "sha1":"755187bd8550881bb0c9951822e74a9a53c8d0f3", "execEpoch":1336757832, "execModify":"Fr, Ma, 1, 12:37:1, 2012", "startTime":"Fr, Ju, , 22:47:4, 2012", "numCores":"64", "sizeT":{"bss":"36224", "text":"3502656", "data":"128944"}},
那么如何构造一个正则表达式来删除这些字段呢?谢谢!!!!
好的,我修复了 JobID 字段中缺少的报价,现在怎么办?