I have a string containing html code. Now I'd like to delete all comments (everything between <!-- and -->).
Doing
seems to delete everything from first '<!--' to last '-->'. (Instead of deleting only until the next '-->').
How do I need to modify my regex to remove the stuff only between opening and closing comment marks?
Doing
Code:
$string =~ s/<!--(.*)-->//g;
How do I need to modify my regex to remove the stuff only between opening and closing comment marks?