Test, validate and match regular expressions
This regex matches and extracts the value of the `class` attribute from HTML tags, regardless of whether it uses single quotes, double quotes, or no quotes at all. By utilizing a negative lookahead, it accurately captures the content without bleeding into subsequent attributes or the closing tag. This makes it highly useful for web scraping, HTML parsing, and sanitizing user-generated content where markup might be malformed.