RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
<!--[\s\S]*?-->
Description
Removes pesky comments and commented javascript from HTML
Matches
<!-- comments --> | <!-- x = a > b - 3 -->
Non-Matches
<COMMENTS>this is a comment</COMMENTS>
Author Rating: Not yet rated. Lewis Moten
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: HD
Name: HD
Date: 11/24/2018 11:05:18 AM
Comment:
#region Videos_Mst string srnvideo = ""; Videos_Mst objtutorvideo = new Videos_Mst(_Repository); objtutorvideo.Videos_RTutor_Id = tId; object[] infovideomst = _Repository.GetdataVideos(tId); DataTable dtvideo = ConvertDatatable.convertToDataTable(infovideomst); for (int i = 0; i < dtvideo.Rows.Count; i++) { srnvideo += "<li class=''>"; if (dtvideo.Rows[i]["Video"].ToString() != "" && dtvideo.Rows[i]["Video"] != null) { if (dtvideo.Rows[i]["type"].ToString() == "Embeded Video") { srnvideo += "<div class=''>"; string embededlink = dtvideo.Rows[i]["Video"].ToString(); embededlink = embededlink.Split('?')[1]; embededlink = embededlink.Split('=')[1]; embededlink = "//www.youtube.com/embed/" + embededlink; srnvideo += "<iframe id='video_slider_" + i + "'runat='server' allowfullscreen='' src='" + embededlink + "' frameborder='0' allowfullscreen='' width='150px' height='100px'></iframe>"; } else if (dtvideo.Rows[i]["type"].ToString() == "Uploded Video") { srnvideo += "<div class='WidthBoxSliderImage'>"; srnvideo += "<object id='MediaPlayer' type='application / x - oleobject' standby='Loading Windows Media Player components...' classid='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95'>"; srnvideo += "<param name = 'showControls' value ='true' >< param name = 'autoStart' value = 'false'>< param name = 'ShowStatusB


Title: Conformity?
Name: Ted
Date: 2/24/2004 10:46:26 PM
Comment:
<!-- ---> isn't a valid comment according to W3C recommendations, but I admit HTML parsers are a bit lax about that generally.


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials