代码之家  ›  专栏  ›  技术社区  ›  toraritte

如何在使用'pcre2test'时返回're>'提示符以开始测试新模式?

  •  0
  • toraritte  · 技术社区  · 6 年前
    $ ./pcre2test
    PCRE2 version 10.32 2018-09-10
      re> /this bar/
    data> this bar 
     0: this bar
    

    当试图点击^D或^C时,它只是简单地退出,或者当尝试其他REPL上通常使用的不同字符串时,会被简单地解释为字符串文本。(考虑到图书馆的用途,这是有道理的。)

    1 回复  |  直到 6 年前
        1
  •  1
  •   toraritte    6 年前

    pcre2test documentation :

    空行或文件结尾表示主题结束 用于测试的行,此时将显示新模式或命令行 如果仍有要读取的输入,则应为。

    也就是说,只需在 data> 促使