Hayat Hayat - 1 month ago 8x
C# Question

Regex For Finding ASP.Net page multiline comment

enter image description hereI have Following code. In Visual studio it possible to find using regex and replace. so i am not able to generate regex for this code. Can anyone help me ?

<div class="span2 control-group">
<%--<asp:Label ID="lblTeamName" Text="Team" runat="server" CssClass="control-label bold"></asp:Label>--%>
<div class="controls">
<%--<telerik:RadComboBox ID="rcbTeam" EmptyMessage="Select" runat="server" Width="160px"
OnSelectedIndexChanged="rcbTeam_SelectedIndexChanged" AutoPostBack="true">
<asp:RequiredFieldValidator ID="RF2" runat="server" ErrorMessage="*" Display="Dynamic" Font-Size="X-Large"
SetFocusOnError="True" ValidationGroup="ChartValidate1" ForeColor="red" ControlToValidate="rcbTeam"></asp:RequiredFieldValidator>

Regex needed for finding content in between of <%--content--%>


Here is a regex you can use (please note the use of *? lazy quantifier so as not to overmatch):


Tested in Visual Studio 2012:

enter image description here