I have written below lines of code
<section class="col col-md-6">
<label for="file" class="input input-file">
Upload Image/Video
<label for="file" class="input input-file">
<div class="button">
<asp:FileUpload ID="UploadSlider1" runat="server" onchange="this.parentNode.nextSibling.value = this.value" />Browse</div>
<input type="text" readonly />
</label>
<asp:HiddenField ID="hdnUploadSlider1" runat="server" />
<asp:CustomValidator ID="CustomValidator1" ControlToValidate="UploadSlider1" OnServerValidate="ValidateFileSize1" runat="server" />
<asp:RegularExpressionValidator ID="UploadSlider1regularexpression" runat="server" ControlToValidate="UploadSlider1" Display="Dynamic" ErrorMessage="Only Images are allowed" SetFocusOnError="true" CssClass="state-error" ValidationExpression="^.*\.((j|J)(p|P)(e|E)?(g|G)|(g|G)(i|I)(f|F)|(p|P)(n|N)(g|G))$"></asp:RegularExpressionValidator>
</section>
<section class="col col-md-6">
<label for="file" class="input input-file">
Upload Image/Video
<label for="file" class="input input-file">
<div class="button">
<asp:FileUpload ID="UploadSlider1" runat="server" onchange="this.parentNode.nextSibling.value = this.value" />Browse</div>
<input type="text" readonly />
</label>
<asp:HiddenField ID="hdnUploadSlider1" runat="server" />
<asp:CustomValidator ID="CustomValidator1" ControlToValidate="UploadSlider1" OnServerValidate="ValidateFileSize1" runat="server" />
<asp:RegularExpressionValidator ID="UploadSlider1regularexpression" runat="server" ControlToValidate="UploadSlider1" Display="Dynamic" ErrorMessage="Only Images are allowed" SetFocusOnError="true" CssClass="state-error" ValidationExpression="^.*\.((j|J)(p|P)(e|E)?(g|G)|(g|G)(i|I)(f|F)|(p|P)(n|N)(g|G))$"></asp:RegularExpressionValidator>
</section>
Now I want that user should be allowed to upload image and video files only. Please help me how to do validation for both types in one regular expression.