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.
我正在使用拼写检查器来改进我的 Latex 文档。我正在使用 vscode,而 Spell Right 扩展可以完成这项工作。我想让它忽略单行注释,所以我设置了以下值:
"spellright.ignoreRegExps": [ "%.*" ]
在设置中,我希望正则表达式能够抓住从 '%' 向前到行尾的一行。但是 Spell Right 扩展考虑了%.*畸形。真的吗?
%.*
当我在 regex101 网站上尝试这个正则表达式时,它会选择我所期望的。
我还缺少另一种正确的方法吗?
我在网上找到了一些ignoreRegExps的例子,其中:
因此,也许您应该将正则表达式更改为:
"/%.*/"