【问题标题】:In cscope how to search for a string with period in it?在 cscope 中如何搜索带有句点的字符串?
【发布时间】:2014-01-17 09:30:05
【问题描述】:

在 cscope 中如何搜索带句点的字符串?例如。我有一条线

.mount = testmount

在我的代码中,但如果我尝试搜索 C 符号甚至文本字符串 .mount,我会得到包含单词 mount 的每一行。使用反斜杠作为转义字符似乎也不起作用。

【问题讨论】:

    标签: ctags cscope


    【解决方案1】:

    如果搜索字符串有句点,则搜索 egrep 模式而不是文本或符号,因为句点是搜索 egrep 模式和文件的有效输入,但不适用于搜索符号或文本。

    当 cscope 启动时,它会弹出以下选项。选择“查找此 egrep 模式:”。

    Find this C symbol:
    Find this global definition:
    Find functions called by this function:
    Find functions calling this function:
    Find this text string:
    Change this text string:
    Find this egrep pattern:.mount
    Find this file:
    Find files:
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多