Test, validate and match regular expressions
This regex matches paired HTML comment shortcodes, such as <!--begin type--> content <!--end type-->, ensuring the closing tag's type matches the opening tag's type via a backreference. It captures the type in group 1 and the embedded content in group 2. This is useful for parsing template blocks, custom markup, or extracting sections of code from files that use comment-based shortcodes.