Test, validate and match regular expressions
This regex matches Markdown headers containing a custom ID attribute enclosed in curly braces, such as `# Header {#section-id}`. It extracts the heading text into the first capture group and the custom ID into the second. It is highly useful for parsers or documentation generators that need to process extended Markdown syntax and create anchor links for specific sections.