my $html = qq| <!-- HTML comment#1 Some comment --> Some text <!-- HTML comment#2 Some comment --> |;I want to replace all the html comments enclosed in comment tags mentioned above in $html with NULL value, there could be newlines as well in the variable. Can somebody tell me the regex ? I tried below but could not get it working:-
$html =~ s/<!--.*-->//mg;
In reply to removing html comments from the page source by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |