我正在使用 Silver Searcher 中的 vim Ag.vim 。我要搜索let(:application
在我的项目中。
如果我这样做:Ag "let(:application" app/
我明白了
|| ERR: Bad regex! pcre_compile() failed at position 16: missing )
|| If you meant to search for a literal string, run ag with -Q
没有结果 Ag -Q "let(:application" app/
知道正确的模式吗?
最佳答案
您可以转义 (
:
Ag 'let\(:application' app/
或者使用 grep
和 -F
来获取固定字符串:
grep -F "let(:application" app/
关于vim - 带括号和分号的 Grep/Ack 表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34396979/