Pattern
/\b(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}\b/Sample text
Visit regexbench.ru or sub.example.co.uk not a domain localhostTest this pattern in the editor
Simple FQDN matcher for hostnames in prose.
/\b(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}\b/Visit regexbench.ru or sub.example.co.uk not a domain localhostTest this pattern in the editor
Match protocol, host, and optional path/query.
kebab-case slugs for routes and CMS paths.
Octet-bounded IPv4 matcher for log scraping.
Common full and compressed IPv6 forms.
Colon or hyphen separated IEEE MAC addresses.
Host, time, and request from a Combined log line.