Dec '23

Grabbing a domain name out of a URL using Shortcuts – Security Boulevard

The Home of the Security Bloggers Network
Home » Security Bloggers Network » Grabbing a domain name out of a URL using Shortcuts
Recently I needed the ability to grab a domain name (specifically the hostname) out of a URL using Shortcuts.  
Assuming that there is more than two parts to the domain name, this works.  But if you have and “A” type of url “blah.com” instead of a “CNAME” type like: “www.blah.com”, you’re going to get “com” as a result.  So your milage may vary.
I couldn’t find a good way to do this on the Internet, despite several attempts for people to try and figure it out using regex.  You can then go on to store the result as a variable and then use the variable anywhere else in the rest of the Shortcut.  
Please leave comments below.
*** This is a Security Bloggers Network syndicated blog from Joel Esler authored by Joel Esler. Read the original post at: http://blog.joelesler.net/2023/12/grabbing-domain-name-out-of-url-using.html
More Webinars
Security Boulevard Logo White

Step 1 of 8

How do you define cloud resiliency for cloud workloads? (Select 3)(Required)

Step 1 of 8




Joker has been buying and selling domains since the late 90's. He has worked with many portfolios and investors over the past decade as well.

Leave a Reply

Your email address will not be published. Required fields are marked *