帮忙看下winform textbox1里有一下内容:<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td colspan="6">
录入</td>
</tr>
<tr>
<td>
sadf </td>
<td>
<asp:TextBox ID="txtname" runat="server"></asp:TextBox></td>
<td>
twe4rtd>
<td>
<asp:RadioButtonList ID="Radiosex" runat="server" RepeatColumns="2" Width="88px">
<asp:ListItem Selected="True">男</asp:ListItem>
<asp:ListItem>女</asp:ListItem>
</asp:RadioButtonList>
</td>
<td>
dsf</td>
<td>
<asp:TextBox ID="txtname1" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:Label ID="lblname2" runat="server" Text="424sfd"></asp:Label></td>
<td>
<asp:TextBox ID="txtname2" runat="server"></asp:TextBox></td>
<td>
<asp:Label ID="lblzname" runat="server" Text="sdfsd"></asp:Label></td>
<td>
<asp:TextBox ID="txtzname" runat="server"></asp:TextBox></td>
<td>
<asp:Label ID="lblcardid" runat="server" Text="身份证号"></asp:Label></td>
<td>
<asp:TextBox ID="txtcardid" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:Label ID="lblcountry" runat="server" Text="43"></asp:Label></td>
<td>
<asp:TextBox ID="txtcountry" runat="server"></asp:TextBox></td>
<td>
sfasadf</td>
<td>
<asp:TextBox ID="txtprovince" runat="server"></asp:TextBox></td>
<td>
</td>
<td>
<asp:TextBox ID="txtcity" runat="server"></asp:TextBox></td>
</tr> <tr>
<td>
<asp:Label ID="lbljuweihui" runat="server" Text="34234"></asp:Label></td>
<td>
<asp:TextBox ID="txtjuweihui" runat="server"></asp:TextBox></td>
<td>
<asp:Label ID="lblhujiaddress" runat="server" Text="yijuyfgh"></asp:Label></td>
<td colspan="3">
<asp:TextBox ID="txthujiaddress" runat="server"></asp:TextBox></td>
</tr>
</table>
我要获取所有<asp:TextBox>标签的id 用这则怎么写
高手帮帮忙,正则还是不太会
<tr>
<td colspan="6">
录入</td>
</tr>
<tr>
<td>
sadf </td>
<td>
<asp:TextBox ID="txtname" runat="server"></asp:TextBox></td>
<td>
twe4rtd>
<td>
<asp:RadioButtonList ID="Radiosex" runat="server" RepeatColumns="2" Width="88px">
<asp:ListItem Selected="True">男</asp:ListItem>
<asp:ListItem>女</asp:ListItem>
</asp:RadioButtonList>
</td>
<td>
dsf</td>
<td>
<asp:TextBox ID="txtname1" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:Label ID="lblname2" runat="server" Text="424sfd"></asp:Label></td>
<td>
<asp:TextBox ID="txtname2" runat="server"></asp:TextBox></td>
<td>
<asp:Label ID="lblzname" runat="server" Text="sdfsd"></asp:Label></td>
<td>
<asp:TextBox ID="txtzname" runat="server"></asp:TextBox></td>
<td>
<asp:Label ID="lblcardid" runat="server" Text="身份证号"></asp:Label></td>
<td>
<asp:TextBox ID="txtcardid" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:Label ID="lblcountry" runat="server" Text="43"></asp:Label></td>
<td>
<asp:TextBox ID="txtcountry" runat="server"></asp:TextBox></td>
<td>
sfasadf</td>
<td>
<asp:TextBox ID="txtprovince" runat="server"></asp:TextBox></td>
<td>
</td>
<td>
<asp:TextBox ID="txtcity" runat="server"></asp:TextBox></td>
</tr> <tr>
<td>
<asp:Label ID="lbljuweihui" runat="server" Text="34234"></asp:Label></td>
<td>
<asp:TextBox ID="txtjuweihui" runat="server"></asp:TextBox></td>
<td>
<asp:Label ID="lblhujiaddress" runat="server" Text="yijuyfgh"></asp:Label></td>
<td colspan="3">
<asp:TextBox ID="txthujiaddress" runat="server"></asp:TextBox></td>
</tr>
</table>
我要获取所有<asp:TextBox>标签的id 用这则怎么写
高手帮帮忙,正则还是不太会
Regex reg=new Regex(@"<asp:TextBox ID="(?<txtID>[^\"]+)?"[\w\W]+?>");
Regex re = new Regex(@"(?<=<asp:TextBox\s*ID=\")[^\"]*");
Regex reg=new Regex(@"<asp:TextBox ID=\"(?<txtID>[^\"]+)?\"[\w\W]+?>");