title: Regular expression to get the Name from URL link
body: <p>I have a Hyperlink field (aka column) in SharePoint 2010.</p>
  
  <p>Say it's called <code>SalesReportUrl</code>. The url looks like:</p>
  
  <pre class="lang-none prettyprint-override"><code>http://portal.cab.com/SalessiteCollection/October2012Library/Forms/customview.aspx
  </code></pre>
  
  <p>The hyperlink field stores values in two fields (the link and description).</p>
  
  <p>What would be the RegEx if I want to get the <code>October2012Library</code> out of the Url?</p>
  
  <p>I tried this but it's definitely not working:</p>
  
  <pre><code>@"&lt;a[\s]+[^&gt;]*?href[\s]?=[\s\"\']+(.*?)[\"\']+.*?&gt;([^&lt;]+|.*?)?&lt;\/a&gt;";
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>^(.*?/)?Forms/$ 
  </code></pre>
  
  <p>but no luck.</p>
  
  <p>I think sharepoint stores hyperlink like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>http://portal.cab.com/SalessiteCollection/October2012Library/Forms/customview.aspx, some description
  </code></pre>
  
  <p>Looks like this has a solution. but what's the syntax substring get the list or library name ?<a href="https://sharepoint.stackexchange.com/questions/40712/get-list-title-in-sharepoint-designer-workflow">https://sharepoint.stackexchange.com/questions/40712/get-list-title-in-sharepoint-designer-workflow</a></p>