V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
letitbesqzr
V2EX  ›  问与答

求推荐文本内容整理工具..

  •  
  •   letitbesqzr · 2014-05-31 09:48:41 +08:00 · 2800 次点击
    这是一个创建于 3633 天前的主题,其中的信息可能已经有所发展或是发生改变。
    (112, 'xxxxsina', '4d6104e0fca23e932dcee3b305d2edad', xxxx163.com', 0, 0, 0, '', '', 0, 1277086944, 1277030908, 1277026565, 1, '28800', 'zh-hans', '', '[email protected]', 'a:0:', '13333333333', '386533010', '2012-05-19', 3, 0, '', 0, 0, 0.00, 'tfwow', 1, 0, 0, 0, 0, 1, 0, 0, 0),
    (113, 'xxxx11', '9a84ee41aa72de59c63006aad670bcce', 'xxxx63.com', 0, 0, 0, '', '', 0, 1277086944, 1277030908, 1277026565, 1, '28800', 'zh-hans', '', '[email protected]', 'a:0:', '13333333333', '5464566558', '2012-05-19', 3, 0, '', 0, 0, 0.00, 'tfwow', 1, 0, 0, 0, 0, 1, 0, 0, 0),
    (114, 'xxxx77', 'ec1053886e56eb02030a2c80b81cc02e', [email protected]', 0, 0, 0, '', '', 0, 1277086944, 1277030908, 1277026565, 1, '28800', 'zh-hans', '', '[email protected]', 'a:0:', '13333333333', '565425677', '2012-05-19', 3, 0, '', 0, 0, 0.00, 'tfwow', 1, 0, 0, 0, 0, 1, 0, 0, 0),
    (115, 'xxxx1', '7a6322d4cd522986abfc17e6f73ef4ab', 'xxxx163.com', 0, 0, 0, '', '', 0, 1277086944, 1277030908, 1277026565, 1, '28800', 'zh-hans', '', '[email protected]', 'a:0:', '13333333333', '41228506', '2012-05-19', 3, 0, '', 0, 0, 0.00, 'tfwow', 1, 0, 0, 0, 0, 1, 0, 0, 0),
    (116, 'fxxxx', '2a886930e969b2f60c91bd3b784db972', 'xxx163.com', 0, 0, 0, '', '', 0, 1277086944, 1277030908, 1277026565, 1, '28800', 'zh-hans', '', '[email protected]', 'a:0:', '13333333333', '654891141', '2012-05-19', 3, 0, '', 0, 0, 0.00, 'tfwow', 1, 0, 0, 0, 0, 1, 0, 0, 0),
    (117, 'xxxx29', 'f1d6786a2e5a3e99fbe3d2d61069c579', '[email protected]', 0, 0, 0, '', '', 0, 1277086944, 1277030908, 1277026565, 1, '28800', 'zh-hans', '', '[email protected]', 'a:0:', '13333333333', '532984545', '2012-05-19', 3, 0, '', 0, 0, 0.00, 'tfwow', 1, 0, 0, 0, 0, 1, 0, 0, 0),
    (118, 'xxxxc', '1ed74d69c7dc34c73b377df6d04d284f', '[email protected]', 0, 0, 0, '', '', 0, 1277086944, 1337322521, 1337322294, 1, '28800', 'zh-hans', '', '[email protected]', 'a:0:', '13333333333', '188420909', '2012-05-21', 3, 0, '', 0, 0, 0.00, 'tfwow', 0, 0, 0, 6, 0, 1, 0, 0, 0),


    ----


    比如以上这段数据,想把账号 密码 邮箱 分别列出成一个文本,平时的做法都是用wps表格打开,然后用逗号分割后一行行去掉'号复制过去.
    现在的编辑器有一堆功能,但不知道什么功能能做这件事.
    11 条回复    2014-05-31 14:13:10 +08:00
    ratatata
        1
    ratatata  
       2014-05-31 09:54:43 +08:00   ❤️ 1
    你需要 awk/sed,或者任何一门稍微主流一点的编程语言
    letitbesqzr
        2
    letitbesqzr  
    OP
       2014-05-31 09:58:46 +08:00
    @ratatata N久前也用python来做这件事,但是需要修改的文件非常多,为每个都去写一个脚本 太麻烦了。
    shoumu
        3
    shoumu  
       2014-05-31 10:02:53 +08:00
    可以用sublime,用正则表达式find all,然后复制出来

    虽然我想说直接写个脚本处理一下,但是还是想看看还有什么工具。
    JoyNeop
        4
    JoyNeop  
       2014-05-31 10:52:38 +08:00 via iPad
    () 都换成 {},单引号都换成双引号,然后前后加 [ 和 ],当 JSON 处理写进 MongoDB
    ceyes
        5
    ceyes  
       2014-05-31 11:37:57 +08:00
    letitbesqzr
        6
    letitbesqzr  
    OP
       2014-05-31 11:39:00 +08:00
    @ceyes 3Q 还是去学好awk
    ceyes
        7
    ceyes  
       2014-05-31 11:42:17 +08:00   ❤️ 1
    why
        8
    why  
       2014-05-31 11:46:51 +08:00
    文本编辑器可以选有垂直选择列的功能,外加正则替换即可
    likaci
        9
    likaci  
       2014-05-31 11:50:01 +08:00
    RegexBuddy 不过是付费的
    lsmgeb89
        10
    lsmgeb89  
       2014-05-31 12:52:42 +08:00
    同意一楼,awk 和 sed 是解决这种问题的好工具。哎,我可是每次学,过很久不用,又忘记了。
    cxmtime
        11
    cxmtime  
       2014-05-31 14:13:10 +08:00
    Emacs键盘宏瞬间迅速搞定。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1023 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 22:44 · PVG 06:44 · LAX 15:44 · JFK 18:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.