如何在我的文件中查找包含< relref "
并且在初始/
之后不包含#
或"
的所有实例。
我尝试使用正则表达式预行,即< relref "((?!/).)*
,但VSCode不支持它们。
简单来说:
These should match:
{{< relref "blog/foo.md" >}}
{{< relref "blog/2018/10/09/foo.md" >}}
{{< relref "bar.md" >}}
These should not match:
{{< relref "/bar.md" >}}
{{< relref "#anchor" >}}
{{< relref "/foo/bar.md" >}}
答案 0 :(得分:0)
这应该可行,假设您要匹配从{{
到}}
的所有内容:
{{< relref "[^\/#][^"]*" >}}
答案 1 :(得分:0)
仅告诉您{1.2}版本v1.29中已添加了超前支持。