Test, validate and match regular expressions
Matches fully-qualified domain names where each DNS label is 1-63 alphanumeric or hyphen characters that neither starts nor ends with a hyphen, followed by a 2-6 letter top-level domain (e.g., example.com, sub.domain.co.uk). With global and multiline flags, it validates or extracts multiple domains line-by-line, making it useful for form validation, URL parsing, and email domain checks.