Open Han-Gang opened 5 years ago
grep -oP '"(\"|[^"]){10,}(?!\")"' test
python -c 'import urllib;print urllib.quote("\xxx\xxx\xxx")'
doublequote 是 "" 替换 为"
import sys
import urllib
for line in sys.stdin:
cmd = 'print '+line
exec(cmd)
import sys import urllib for line in sys.stdin: cmd = 'print '+line.strip() + " + ';'" exec(cmd)
import csv
out = open ('output.txt','w')
with open('XXX.log', 'rU') as f:
reader = csv.reader(f, delimiter="\t")
for i in reader:
print i[2],i[17]
out.write(i[2]+"\n")
out.close()
python解析日志 处理 1, 2, 3, "kljalsdf , sdf, asdf \" fasdf \"", 0, 0这样的格式 要首先把 , " 全部替换为," (逗号和双引号之间无空格) 然后