extracting parameter from a url using C#
where i am looking for key in the url.Query
Regex fileRegex = new Regex(@"^\?key=(?<1>[^&]*)$", RegexOptions.Singleline | RegexOptions.IgnoreCase);
Match fileMatch = fileRegex.Match(Uri.UnescapeDataString(url.Query));
if (fileMatch.Success)
return fileMatch.Groups[1].Value;
Monday, July 23, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment