Truncate URL to only show domain name

Would you have any idea how we can display only the domain name for a URL? For instance medium.com instead of https://medium.com/sketchdeck-developer-blog/what-i-wish-i-knew-when-i-became-cto-fdc934b790e3
Thanks!

Hi john,

This regex work. There’s many other regex outside that can make the job maybe better.

2 Likes

But I think the OP means in the browser.

The Browser plugin described here can rewrite the visible URL (and other stuff):

1 Like

Thanks! Awesome! Sorry if that was confusing. The reply from @JohnMark is what I was looking for!
Which regex would you use to remove the “https://” part? Sorry for asking.

1 Like

Just the other function Find and Replace, find: https:// and replace:(empty). You’re welcome.

3 Likes

Thanks!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.