Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在(我的)XEmacs 21.4 中,gdb-prompt-pattern 的描述变量给出:
Value: "^>\\|^(.*gdb[+]?) *\\|^---Type <return> to.*--- *"
里面的“[+]”是什么?它只是意味着“+ 字符”吗?如果是这样,为什么不使用“\+”?
在您的上下文中,[+] 与 , 相同\+,即匹配+字符,我想该正则表达式的原始作者要么出于可读性原因这样做,要么可能是因为 [+]过去曾经是某些字符集,例如 [-+]
[+]
\+
+
[-+]
in regular expression [+] is symbol +
any symbol in [] is symbol except -
[]
-