Help for this page

Select Code to Download


  1. or download this
    $COMMENT_rex = qr{
      <!--            # opening <!--
    ...
      )*              # 0 or more times
      -- \s* >        # the ending -->
    }x;
    
  2. or download this
    $COMMENT_rex =
      qr{<!--[^-]*(?:(?!--\s*>)-(?:-[^-]*(?:-[^-]+)*)?[^-]*)*--\s*>};