我可以毫无问题地搜索以下内容:
_GET
$variable
但是,sublime无法搜索
$_
(例如$_GET
)。我试图以某种方式对其进行转义:$\_GET
\$_GET
$__GET
我在Ubuntu 14.04LTS上
最佳答案
关闭正则表达式搜索。它是搜索字段最左边的按钮(在当前选中的这张图片中):
关闭正则表达式:
尽管由于您尝试使用\$_
进行转义,所以我不确定这是否适合您的确切问题,但此答案可能仍然对后代有所帮助。
您是否还确保关闭“整个单词”搜索? 这是左边的第三个按钮(Aa
旁边)
打开整个单词:
尝试逃脱的\$_
失败:
它以_GET
成功:
请注意,如果存在一个完整的$_
词组(由空格包围),整个单词$_
的搜索将成功。例如,对以下内容进行全字搜索:
I am a sentence with the keyword $_ which will be matched.
会起作用,而:
I am a sentence with the keyword $_GET, which will never match. $_POST, $_REQUEST, and $_SERVER won't work either.
会破坏整个单词搜索。
关于search - Sublime Text 3 : I can't search a string with a dollar followed by underscore ($_GET, $ _POST等),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27495746/