I have the following strings
http://example.com https://example.com http://www.example.com
how do i get rid of the http:// or
http://
You can use the URL object like this:
const urlWithoutProtocol = new URL(url).host;