62,046
社区成员
发帖
与我相关
我的任务
分享
string str = "www.aaa.com/bbb.html";
string result = Regex.Replace(str, @"([^/]+)\.[^.]+$", match => match.Groups[1].Value + "/");
Console.WriteLine(result);
<RewriterRule>
<LookFor>~/(\w+)</LookFor>
<SendTo>~/$1.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(?????)</LookFor>
<SendTo>~/$1.aspx</SendTo>
</RewriterRule>
问号里应该怎么写啊?是这样的