I am trying to find a way to parse a URL in the Global.asax file in ASP.NET into sections.
Given the example of: http://www.site.com/OptionalFirstURLSection/Pages/PageKey I need to find a way to capture the PageKey (maybe using a regular expression) in these scenarios:
The folder Pages exists in the URL string followed by some value –
PageKey from the following
http://www.site.com/Pages/PageKey/ (trailing slash)