【问题标题】:Need a way to extract string constants from source code [closed]需要一种从源代码中提取字符串常量的方法[关闭]
【发布时间】:2017-03-15 23:42:29
【问题描述】:

我需要做以下事情:

  • 显然是提取字符串
  • 忽略源代码中的 cmets,// 和多行 /* ... */
  • 处理字符串中的引号:'But he wasn\'t here!', "It just won't \"do it\"!"

我试图使用grep 想出一些东西,但我在引号和多行 cmets 中遇到了问题。我认为这超出了grep 的能力。

【问题讨论】:

    标签: javascript regex parsing utility


    【解决方案1】:

    看看xgettextxgettest-js - 它应该可以满足您的需求!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-11
      • 1970-01-01
      • 2010-11-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多