regex - 正则表达式可以用于 Fluid 应用程序中的 URL 模式吗?

标签 regex macos userscripts fluid-mac-app-engine

URL 模式在 Fluid app 中非常方便(OS X 的站点特定浏览器)支持某些指定 URL 的脚本/样式,例如: Userstyles/Userscripts Window in Fluid app

stated on the official website :

In the "Pattern" table below, you should add a pattern for any URL which you want to your Fluid App to visit. Star ("*") is a special character in this table. Star means "match anything here", and is a powerful way to easily include or exclude very large groups of URL patterns.

  1. 我们可以使用其他字符,例如“?”除了用“*”来匹配 URL 之外?
  2. 可以使用正则表达式代替吗?

最佳答案

这里是 Fluid 的开发者。

更新: 是的!现在您可以使用简单的通配符模式或完整的正则表达式模式。

在通配符模式中,星号(“*”)是一种特殊的通配符,意思是“匹配此处的任何内容”,并且是轻松包含或排除大量 URL 模式的强大方法。

或者,您可以使用完整的正则表达式模式来代替通配符模式,方法是将您的网址模式括在正斜杠/中,例如:/http://google.com/.+/。

Full details on the Whitelist feature in Fluid are here.

关于regex - 正则表达式可以用于 Fluid 应用程序中的 URL 模式吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15716077/

相关文章:

负向前瞻的正则表达式

ios - 在 Swift 中动态创建对象

python - 如何通过 easy-install 安装特定版本的 pip? - Mac OS 小牛队

javascript - 使用 Tampermonkey 脚本更改弹出窗口的标题?

javascript - 如何模拟鼠标点击没有 href 的 <a> 标签?

regex - Mongodb中的部分字符串匹配

javascript - 在 RegExp#test 中使用捕获组是否会降低性能?

javascript - 用于替换嵌套结构中匹配括号的正则表达式

macos - Mac Terminal.app令人讨厌的错误-如何解决?

javascript - 使用用户脚本作为常规 JavaScript?