Archive for March 22nd, 2008

March 22nd, 2008

Regular Expression to find comments in HTML source code

The below mentioned regex or regular expression can be used to find all the comments lines in HTML source code

\< ![^\>]#\>

If you want to clean up your html from comments than you can use the search and replace feature of variuos text editors that understand regex ( ultraedit recommened) and replace this regex string with an empty one

You can even use this regex in MS Frontpage to remove the commented text

the imax | 6:59 am | Uncategorized | Comment (1)