title: Truncate Domain From URL using Java
body: <p>Given such a domain:</p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>http%3a%2f%2fwww.google.com%2fpagead%2fconversion%2f1001680686%2f%3flabel%3d4dahCKKczAYQrt7R3QM%26value%3d%26muid%3d_0RQqV8nf-ENh3b4qRJuXQ%26bundleid%3dcom.google.android.youtube%26appversion%3d5.10
  </code></pre>
  
  <p>I want to replace the</p>
  
  <pre class="lang-none prettyprint-override"><code>%3a%2f%2
  </code></pre>
  
  <p>with </p>
  
  <pre class="lang-none prettyprint-override"><code>://
  </code></pre>
  
  <p>and get rid all the content behind ".com", so finally I just want to got </p>
  
  <pre class="lang-none prettyprint-override"><code>http://www.google.com
  </code></pre>
  
  <p>How can I implement this in Java using a regex? </p>