Test, validate and match regular expressions
This regex matches an HTML anchor tag (<a>) along with its preceding content in a non-greedy manner, capturing the full tag, the href attribute value, and the link text. It is useful for extracting first hyperlink from an HTML document or snippet, though it may break on nested tags or multiple attributes. Use with care for simple parsing tasks, but prefer proper HTML parsers for robust extraction.