小编Jak*_*sed的帖子

在Greasemonkey @include中使用正则表达式?

我想在我的Greasemonkey脚本运行的地方更好地指定一下.

// @include     https://example.com/*
Run Code Online (Sandbox Code Playgroud)

工作正常,但它太不准确,我想要的东西像:

// @include     https://example.com/xx-xx/Asset/*
Run Code Online (Sandbox Code Playgroud)

xx可以是任何字母az, - 只是短划线,xx可以是任何字母az.我的想法是使用任何5个符号的正则表达式,但我不知道如何正确使用它.这不起作用,我尝试过更多的表达:

// @include     https://example.com/...../Asset/*
Run Code Online (Sandbox Code Playgroud)

知道如何处理这个?

更新:
这种作品:

// @include     https://example.com/*/Asset/*
Run Code Online (Sandbox Code Playgroud)

regex greasemonkey

5
推荐指数
1
解决办法
4758
查看次数

标签 统计

greasemonkey ×1

regex ×1