用于分隔URL的锚定部分的正则表达式

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用于分隔URL的锚定部分的正则表达式相关的知识,希望对你有一定的参考价值。

Dots match any charecter, this matches any 7 chars. You need to change that bit to match a different pattern.
  1. private string GetAnchorPart()
  2. {
  3. string anchorExp = "[#].......";
  4. Regex rex = new Regex(anchorExp);
  5. Match anchorMatch = rex.Match(Request.RawUrl);
  6. return anchorMatch.ToString();
  7. }

以上是关于用于分隔URL的锚定部分的正则表达式的主要内容,如果未能解决你的问题,请参考以下文章