var out = "";

function enter(){
  var text = document.getElementById("textbox");
  var url = text.value;
  if (url.match(/https?:\/\/[^/]+(\/.*)/)){
    out = RegExp.$1;
  }
  console.log(url);
  
  var target = document.getElementById("output");
  target.innerText = out;
  
  text.value = "";
}
