搜索 Sharepoint 2013 中的正则表达式

Regular expression in Search Sharepoint 2013

我在 Sharepoint 2013 搜索中使用正则表达式时遇到问题。 我将其插入爬网规则并选中使用正则表达式语法匹配此规则。

我在 regex101 页验证了我的正则表达式,所以我 100% 确定它是正确的。

^(https?:\/\/)([\da-zA-z\.]+)\/([\da-zA-z]+)$

这是抓取规则的第一位,我select排除了,但页面仍然可以搜索到。 我做错了什么?

请注意根据MSDN blogs(虽然它适用于 MS SharePoint 2010,但我认为它对 2013 仍然有效)

Regular expression operators cannot be used in the protocol part of the URL. This means, for example, the following RegEx rule cannot be created: .//www.microsoft.com/. If you try to create a rule like this, the system will add http:// in the beginning and thus make “.” as the second part of the URL. The resulting rule in this case will be: http:// .//www.microsoft.com/.* which may not be what you intended.

所以,只尝试 ([\da-zA-Z.]+)\/([\da-zA-Z]+)$

甚至([^\/]+)\/([^\/]+)$