57
I believe this does it right.It is important to note that you have the --> at the end, so the string inside the comment cannot end with - or else you will have --->
use this to test it and see what it is matching:s/(?<=<!--)(.*?)-->/($_=$1);s|--|-¬|g;s|-$|¬|;"$_-->"/seg
s/(?<=<!--)(.*?)-->/($_=$1);s|--|-¬|g;s|-$|¬|;"[$_]-->"/seg
In reply to Re: Golf: Fix de facto HTML comments
by Chady
in thread Golf: Fix de facto HTML comments
by tye
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |