Asp.net 用于在文本文件中查找所有aspx链接的正则表达式-但不用于替换的html

Asp.net 用于在文本文件中查找所有aspx链接的正则表达式-但不用于替换的html,asp.net,regex,Asp.net,Regex,我想我的正则表达式就快到了,比如说,我有以下几点: <li id="ctl00_dashboard1_liReports" class="fade_hover tooltip" title="Reports"> <a id="ctl00_dashboard1_HyperLink1" href="reportlist.aspx"><img id="ctl00_dashboard1_imgCheck3" src="assets/icons/dashboard/8

我想我的正则表达式就快到了,比如说,我有以下几点:

<li id="ctl00_dashboard1_liReports" class="fade_hover tooltip" title="Reports">
    <a id="ctl00_dashboard1_HyperLink1" href="reportlist.aspx"><img id="ctl00_dashboard1_imgCheck3" src="assets/icons/dashboard/81.png" alt="Reports" style="border-width:0px;" />
        <span>Reports</span></a></li>
<li id="ctl00_dashboard1_messagetitle" class="fade_hover tooltip" title="8 new alerts">
    <a id="ctl00_dashboard1_messagelink" href="reportlist.aspx?sectionname=My+Tasks"><img id="ctl00_dashboard1_imgCheck4" src="assets/icons/dashboard/75.png" alt="My Tasks" style="border-width:0px;" />
        <span>My Tasks</span></a><span class="bubble">8</span></li>
<li id="ctl00_dashboard1_adminli" class="fade_hover tooltip" title="Admin">
    <a id="ctl00_dashboard1_lnkUser" href="/admin/useradmin.aspx"><img id="ctl00_dashboard1_imgCheck2" src="assets/icons/dashboard/54.png" alt="Admin" style="border-width:0px;" /><span id="ctl00_dashboard1_lbladmin">Admin</span></a></li>
<li id="ctl00_dashboard1_lilogout" class="fade_hover tooltip " title="End current session">
    <a id="ctl00_dashboard1_lnkLogout" href="/default.aspx"><img src="assets/icons/dashboard/118.png" id="ctl00_dashboard1_imgCheck5" alt="Logout" />
        <span>Logout</span></a></li>
它与以下内容匹配,但正如您所看到的,在查询字符串的=处停止。任何帮助都将不胜感激

这应该可以:

href=.*.aspx[0-9a-zA-Z\;\+\=\?\%\&]*
经过测试

编辑:编辑以包含更多特殊字符和数字

这个怎么样:

href=\".*.aspx[^\"]*\"

在这个正则表达式中,我们不需要包含特殊字符和数字,因为我们可能会遗漏一些字符和数字。

嘿,谢谢你。不幸的是,它也卡在查询字符串上。请尝试URL,现在再试一次。我更新了一些数字和一些特别的字符。先生,你是一个传奇。非常感谢。
href=\".*.aspx[^\"]*\"