Answer the question
In order to leave comments, you need to log in
How to cut a domain from a URL without www. using RegExp?
There are page addresses, in Sublime Text you need to quickly cut out only the domain without "www.". The regular expression itself is almost ready (found) but I can’t finish it (misunderstand).*://|/.*
https://domen.site.ru/podsait/03285926/#2412747495
http://www.site.ru/site/24722305
https://www.domen.site.ru/site/247493215/site
site.ru
Answer the question
In order to leave comments, you need to log in
https://regex101.com/r/gFBb8y/3
Find: https?://(?:www\.|)([\w.-]+).*
Replace:$1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question