I know there are tons of domain matching regular expressions floating around, but couldn’t find one to answer my particular question. I’m looking for a regular expression that will match only a URL’s domain name, but nothing else (not even the TLD). It doesn’t need to validate the domain.
So given the sample below:
https://www.orchardsoft.com
https://www.horizon-lims.com/contact/us
https://www.quartzy.com
https://qbench.net
https://www.xifin.com
...the regular expression needs to match for the following:
Orchardshot
Horizon-lims
Quartz
QBench
Xifin
The regular expression I'm starting with is this: (.|//(\w+.)+
Is anyone able to point me in the right direction?