Test, validate and match regular expressions
Matches a complete HTML/XML element named 'tag', including the opening tag with optional attributes, inner content, and closing tag. The lazy capture group (.*?) extracts the text between the tags, while \s* tolerates whitespace around the tag name and closing slash. With global and case-insensitive flags, it finds all occurrences regardless of casing, making it useful for extracting content from markup or parsing simple HTML documents.