I'm working with asp.net C# and need a regex pattern to extract a portion of a pathname URI.
Example:
pathName1 = "/Tests/plans.aspx";
pathName2 = "
http://mydomain.com/Tests/plans/error.aspx";
In both cases I need the pattern to extract "/Test/plans" from the given pathname. How would I do this?