通过Sublime Text对cooki进行字典格式处理

原代码:如下
acw_tc=2f624a3015693749431602202e42f57e6476d80df9249438120e1ca41a9207; Hm_lpvt_65968db3ac154c3089d7f9a4cbb98c94=1569374944; _ga=GA1.2.799988298.1569374944; _gid=GA1.2.1355868370.1569374944; _gat=1; yaozh_userId=817853; UtzD_f52b_saltkey=sn64N6xC; UtzD_f52b_lastvisit=1569371347; yaozh_uidhas=1; acw_tc=2f624a3015693749431602202e42f57e6476d80df9249438120e1ca41a9207; Hm_lvt_65968db3ac154c3089d7f9a4cbb98c94=1549521650%2C1569333851%2C1569333974%2C1569374944; UtzD_f52b_ulastactivity=1569334086%7C0; _ga=GA1.1.944215747.1569375402; _gid=GA1.1.521512546.1569375402; PHPSESSID=gq69jb6htv8i5a7hc2pb4ocf63; yaozh_mylogin=1569458055; UtzD_f52b_creditnotice=0D0D2D0D0D0D0D0D0D715319; UtzD_f52b_creditbase=0D0D2D0D0D0D0D0D0; UtzD_f52b_creditrule=%E6%AF%8F%E5%A4%A9%E7%99%BB%E5%BD%95; _gat=1; yaozh_logintime=1569458085; yaozh_user=817853%09%E5%BE%92%E6%AD%A5%E7%8F%8A%E7%91%9A%E6%B5%B73; db_w_auth=715319%09%E5%BE%92%E6%AD%A5%E7%8F%8A%E7%91%9A%E6%B5%B73; UtzD_f52b_lastact=1569458086%09uc.php%09; UtzD_f52b_auth=9ba0hMSjZfeX2wO6gDwdtQTsaV0FjtBG44u47XLbSN3kXRZyTBvUtLir7LRVfV%2BaTV5i8zYUuFNXsVjL6hg8KY8BumU

以下为通过Sublime Text对原代码进行处理:
1、先进行换行操作

;+空格
\n

2.将=号换成:

(.)=(.)
"\1":"\2",

OK! 最终效果:

"acw_tc":"2f624a3015693749431602202e42f57e6476d80df9249438120e1ca41a9207",
"Hm_lpvt_65968db3ac154c3089d7f9a4cbb98c94":"1569374944",
"_ga":"GA1.2.799988298.1569374944",
"_gid":"GA1.2.1355868370.1569374944",
"_gat":"1",
"yaozh_userId":"817853",
"UtzD_f52b_saltkey":"sn64N6xC",
"UtzD_f52b_lastvisit":"1569371347",
"yaozh_uidhas":"1",
"acw_tc":"2f624a3015693749431602202e42f57e6476d80df9249438120e1ca41a9207",
"Hm_lvt_65968db3ac154c3089d7f9a4cbb98c94":"1549521650%2C1569333851%2C1569333974%2C1569374944",
"UtzD_f52b_ulastactivity":"1569334086%7C0",
"_ga":"GA1.1.944215747.1569375402",
"_gid":"GA1.1.521512546.1569375402",
"PHPSESSID":"gq69jb6htv8i5a7hc2pb4ocf63",
"yaozh_mylogin":"1569458055",
"UtzD_f52b_creditnotice":"0D0D2D0D0D0D0D0D0D715319",
"UtzD_f52b_creditbase":"0D0D2D0D0D0D0D0D0",
"UtzD_f52b_creditrule":"%E6%AF%8F%E5%A4%A9%E7%99%BB%E5%BD%95",
"_gat":"1",
"yaozh_logintime":"1569458085",
"yaozh_user":"817853%09%E5%BE%92%E6%AD%A5%E7%8F%8A%E7%91%9A%E6%B5%B73",
"db_w_auth":"715319%09%E5%BE%92%E6%AD%A5%E7%8F%8A%E7%91%9A%E6%B5%B73",
"UtzD_f52b_lastact":"1569458086%09uc.php%09",
"UtzD_f52b_auth":"9ba0hMSjZfeX2wO6gDwdtQTsaV0FjtBG44u47XLbSN3kXRZyTBvUtLir7LRVfV%2BaTV5i8zYUuFNXsVjL6hg8KY8BumU",

你可能感兴趣的:(通过Sublime Text对cooki进行字典格式处理)