Extrahieren rootdomains aus URL-string in Google Sheets

Hallo, ich bin versucht zu extrahieren, die rootdomain aus URL-string in Google Sheets. Ich weiß, wie man die domain und ich habe die Formel zu entfernen www. aber jetzt weiß ich es nicht strip subdomain Präfixe wie 'mysite'.site.com; wo mysite ist nicht ausgezogen aus dem domain-Namen.

Frage: Wie kann ich abrufen, die domain.com rootdomain, wo die domain string-Kontakte (alphanumerische Zeichen, dann 1 Punkt, dann alphanumerische Zeichen (und nichts mehr)

Formel, die bisher in der Google Sheets:

=REGEXREPLACE(REGEXREPLACE(D3923;"(http(s)?://)?(www\.)?";"");"/.*";"")

Vielleicht kann dies vereinfacht werden ...

Testfälle

    https://www.domain.com/=> domain.com
    https://domain.com/=> domain.com
    http://www.domain.nl/=> domain.com
    http://domain.de/=> domain.com
    http://www.domain.co.uk/=> domain.co.uk
    http://domain.co.au/=> domain.co.au
    sub.domain.org/=> sub.domain.com
    sub.domain.org => sub.domain.com
    domain.com => domain.com
    http://www.domain.nl?par=1  => domain.com
    https://www.domain.nl/test/?par=1  => domain.com
    http2://sub2.startpagina.nl/test/?par=1  => domain.com

Extrahieren rootdomains aus URL-string in Google Sheets

InformationsquelleAutor snh_nl | 2015-08-23
Schreibe einen Kommentar