Given a full URI string I want to return only the protocol and domain name. For example:
sometodo("http://127.0.0.1:8000/hello/some/word1212/")
// return: http://127.0.0.1
sometodo("http://127.0.0.1:8000/hello/some/valorant_operator/")
// return: http://127.0.0.1
How can I remove the third /
and the following information from the string?