Regular Expression to Separate the Anchor Part of a URL

private string GetAnchorPart()
{
string anchorExp = "[#].......";
Regex rex = new Regex(anchorExp);
Match anchorMatch = rex.Match(Request.RawUrl);
return anchorMatch.ToString();
}

source

Leave a Reply