Detect Domain Name Regex. URL or Uniform Resource Locator consists of many information parts such as the domain name path port number etc. The definition of Fully Qualified Domain Name FQDN is not well documented my opinion.
Please support me on Patreon. This is how you perform the replacement removing everything except for the domain name as defined by the second group of characters in the regex above. Message My Name is Kevin and my SSN is 123-45-6789 if message -match My Name is and my SSN is ddd-dd-dddd Matches.
Next is the domain name.
This is how you perform the replacement removing everything except for the domain name as defined by the second group of characters in the regex above. Create a regular expression to check the valid domain name as mentioned below. Alias specific hostnames by regex to fully qualified domain name FQDNHelpful. The formula is the key.