【发布时间】:2012-10-09 00:49:47
【问题描述】:
我在 SharePoint 2010 中有一个超链接字段(又名列)。
假设它叫SalesReportUrl。网址如下所示:
http://portal.cab.com/SalessiteCollection/October2012Library/Forms/customview.aspx
超链接字段将值存储在两个字段(链接和描述)中。
如果我想从 URL 中取出 October2012Library,RegEx 会是什么?
我试过了,但肯定不行:
@"<a[\s]+[^>]*?href[\s]?=[\s\"\']+(.*?)[\"\']+.*?>([^<]+|.*?)?<\/a>";
我也试过了:
^(.*?/)?Forms/$
但没有运气。
我认为 sharepoint 像这样存储超链接:
http://portal.cab.com/SalessiteCollection/October2012Library/Forms/customview.aspx, some description
看起来这有一个解决方案。但是获取列表或库名称的语法子字符串是什么?https://sharepoint.stackexchange.com/questions/40712/get-list-title-in-sharepoint-designer-workflow
【问题讨论】:
-
你试过
Uri类吗? -
不确定如何在 Workflow 中使用 Uri 类。我正在尝试从超链接列中获取文档库名称。
-
嗯。没有工作。我可以使用 substring 函数从超链接列(或字段)中提取文档库名称吗
标签: c# regex sharepoint sharepoint-2010